lazwaz
April 21st, 2005, 10:26
Hi,

I have two systems which i have interconnected via LAN, i want to login automatically from one to another system using telnet.
So how can i autologin using telnet??

Please help me out

Thank u,

George

bmw
April 21st, 2005, 14:21
Use ssh, not telnet. Add your public key onto the target system and you will be able to ssh over to it with gay abandon. [That phrase doesn't really work the same as it used-to a few decades ago. :-]

telnet, like the phrase "gay abandon" is obsolete.

still want to use telnet, look at the manpage for how to use the .telnetrc file.]

Atlas
April 21st, 2005, 14:25
If you're going down that far, might as well use rservices...

But SSH is what you should do, absolutely.

lazwaz
April 21st, 2005, 14:42
Ok thanks,
So if SSH is the best solution, how am i going to use it for autologin??
Can u tell me?
Or can u give me the site link??

Thanks ,

George

bmw
April 21st, 2005, 14:48
George, when you say "autologin", do you mean:

1) when I connect manually from host A to host B, I don't want to be prompted for a password.

2) when I login to host A (as a particular user), then I'm automatically logged-in to host B as that user and so I just see host B's shell prompt.

3) none of the above; describe below ...

?

lazwaz
April 21st, 2005, 14:52
ya its

1)when I connect manually from host A to host B, I don't want to be prompted for a password

i want it to automatically login

molotov
April 21st, 2005, 16:52
ssh username:passsword@host

No prompt.

Set up an alias if you dont want to type it all...

bmw
April 21st, 2005, 19:04
If you want to be able to say "ssh hostb" without also typing your password, then the usual method is to use an SSH key. Use ssh-keygen to create your keys. You can usually get away with an unprotected key (unless you are really paranoid), so (on "host A") you can say this: ssh-keygen -t dsa -N ''
The -N option with an empty string ('') as the argument creates a key with no passphrase. The -t dsa arg creates keys suitable for SSH2 protocol.

Then you need to copy the contents of your ~/.ssh/id_dsa.pub file to the file called ~/.ssh/authorized_keys2 on the remote system ("host B"). Be careful to not split the really long line. You can ssh over to the remote system to edit that file. Of course, it will demand your password this time.

Now test it by ssh'ing over again. This time you should be rewarded with a nice prompt from the remote system.

lazwaz
April 22nd, 2005, 13:47
Thanks BMW, i was able to login automically using ssh.:icon_smil:smile:


Regards,

George