connecting to Unix from windows - help

Hello,
I have a requirement like -
I need to connect to specific Unix machine.That machine authenticates the user who is logging in. I am accessing from XP machine.
Is possible to supply the Username & Password along with Host name and port, from Windows command prompt? If so how?

If the target UNIX machine is running the telnet daemon, you can just telnet in from the Windows command prompt

i.e.

telnet hostname port

You'll then be prompted for a user name and password. If no port is specified it'll try the standard telnet port (23).

If you're using SSH on the server, then download a free SSH client such as PuTTY.

Cheers
ZB

Hello,
I would first like to thank you for the quick response. I guess I haven't projected the exact problem. I was using it in the same way as you said.
c:> telnet x.x.x.x 23

Thing is...I need to check the connectivity to different hosts, and all of them require authorization.We were checking them in the same way - first connect to the host,then supply the username & password. And then check for the remaining hosts similarly.It takes atleast 1-2 mins to test each host.We have to check different host with different login credentials. Also, this is a repetitive process which has to be done from time to time. So, this is consuming a lot of time.Is there any alternative to reduce this time taken?
I am looking for, if it is possible to write a batch file for it, but upto now I couldnot makeout any thing.

Also I have very little knowledge of Unix.

Thanks
KK

You could use something like expect for windows or python and write a script to automate this.

Do you have to use 'telnet' to test connectivity to differnet hosts ?

You can use 'ping' as well. Right ?

Just have a thought ... ;

I guess, from 'ping' command we can find only whether the host is reachable or not. But I dont think, the login crendiatials can be authenticated through this command.....

you can also use ftp on cygwin ... (substitute 1st jack with the username and the 2nd jack with the password) ... i would suggest you ping the host first though ...

root_myserver:/home/scripts # ftp -inv << GO
> open icehost
> user jack jack
> bye
> GO
Connected to icehost.
220 This system is for company related use only. Use may be monitored.
331 Password required for jack.
530 Login incorrect.
Login failed.
221 Goodbye.
root_myserver:/home/scripts #

If you don't want to install any external software, this link on automating windows ftp may help you.

From my perspective i will go on using VNC its much reliable then telnet. Im using RealVNC (www.realvnc.com)

Hi ,

I have a much similar question asked in the first post.
In my script(which is in HP UX server) I want to connect to another Unix IBM server and run a script there.After this i want my control back to the first server(The HP).

Is this possible?

I tried something like:
code:

I am getting connected to IBM server but its not taking my echo values as username and password.
How can I resolve this issue?

The following is the output I am getting(I am doing ctrl C after the promt for login remains for long time):

You should really consider SSH for this kind of thing. Set up SSH keys with an empty passphrase (or better use ssh-agent - but anything is better than telnet :)). Then you can do:

echo "I am on server A"
ssh serverb /path/to/remote_script.sh
echo "I am back on server A"

Transmitting your credentials in the clear over a telnet session is a BadThing (TM).

Cheers,
ZB

hi ZB,

Thanks for your reply.
The reason why I am opting for telnet is, SSH is not configured in any of the servers (I am not authorised to do so)

I am getting the following output while trying your code:

i strongly suggest you setup ssh and use that ... your error looks more like a setup issue than an actual prohibition since telnet is still enabled ...

however, if ssh cannot be used --- why don't you use remsh instead of telnet? this way you avoid transmitting passwords in clear text ... make sure $HOME/.rhosts is setup properly and you should be good to go ...

do "man remsh" for more info ...

good luck!

I'm not sure if windows can do bash like scripting but this is how I do it in a Unix environment:
(sleep 3; echo "user"; sleep 3; echo "password"; sleep 3; echo "some cmd") | telnet 68.253.14.129;

I got the idea from this post: http://www.unix.com/shell-programming-scripting/37066-telnet-script.html\#post302114365