LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   automatic login (https://www.linuxquestions.org/questions/programming-9/automatic-login-107700/)

rsingh 10-23-2003 02:57 PM

automatic login
 
i want to write a shell script which will automatically login into a server provinding it with my login name and password .so i dont have to do ssh abc@202.141.x.x everytime and wait for the username password coming up.can somebody help me?

Tinkster 10-23-2003 04:26 PM

I'd suggest reading the ssh manuals and enabling
passwordless logins.

Cheers,
Tink

rsingh 10-24-2003 02:21 AM

what do you mean by passwordless logins?
do you think i should remove my pasword and leave my account open for all.

wisey 10-24-2003 02:30 AM

By using RSA identities, you can create a list of authorised keys, public and
private and login control is managed by the keys and not by usernames and
passwords.

try:

> man ssh
SSH(1) BSD General Commands Manual SSH(1)

NAME
ssh - OpenSSH SSH client (remote login program)

And read it.

worldmagic 10-24-2003 02:59 AM

Theres also a "shell" called "ssh-agent".. the agent asks you for your password to your keys, and after that it will never ask you for the password again.. well.. unless you teminate the "shell". You should also check out how to use keys to login. These can be with or without passwords. if you want a faster way then typing "ssh myname@mydomain.com" you can alyaws use alias:
$ alias jump="ssh myname@mydomain"
then type:
$ jump

vanquisher 10-25-2003 06:55 AM

More info is available at O'Reilly's hack series...it's under Linux administration hacks...try doing this...

$ ssh-keygen -t rsa
"enter private key - hit enter for....."
#You'll get some prompt asking "save rsa key to /home/ur name/.ssh/id_rsa.pub?"...hit enter - best to use defaults
$ scp .ssh/id_rsa.pub urlogin@anotherserver:.ssh/authorized_keys2

it should ask you for your passwd when u scp it...now you can login to 'urlogin@anotherserver' without any passwd and stuff...anyway, do check out the O'Reilly hacks...


All times are GMT -5. The time now is 04:42 PM.