i need to write a script that automatically logins
hi there i am new here, and I would like to ask you how am i able to write a script that automatically logins into a server
what i did is this : I have create a file call connectServer for example , with vim , and inside i have put this commands: echo welcome ssh -l myUsername login.someserver.com echo bye and i ve setup an alias that runs this script such as : in .bashrc alias server="sh connectServer" that works perfectly but what i want is when i am asked for the password , i want the script to fill it .. Is this possible ? thanks, venix |
Quote:
|
What you are looking for is a so-called "unattended SSH login". See a tutorial on this on
http://ubuntu-tutorials.com/2007/02/...tomatic-login/ In a nutshell: You probably want to setup a public key authentication which allows you to login via ssh without a password, so you have to generate your authentication key-pair, and install the public key on the server by adding it to the ssh/authorized_keys file. The tutorial has the details. ---------- T74marcell Arch Linux |
No need to stray to Ubuntu forums ... ;}
http://www.linuxquestions.org/linux/...ation_with_ssh Cheers, Tink |
All times are GMT -5. The time now is 04:36 PM. |