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?
|
I'd suggest reading the ssh manuals and enabling
passwordless logins. Cheers, Tink |
what do you mean by passwordless logins?
do you think i should remove my pasword and leave my account open for all. |
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. |
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 |
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. |