-   Programming (
-   -   "Have to automate the SSH login procedure through shell scripting" (

sorav 11-21-2007 12:35 AM

"Have to automate the SSH login procedure through shell scripting"
HI all,

I am complete novice in shell scripting ,so please be as descriptive as possible. I login on to a remote server through SSH , I know the Username And Password.Now I have to automate this procedure through scripting only, so that once i run it doesnt ask me the username and password.Please anyone knows where to look for ,will be helpful

Berhanie 11-21-2007 05:24 AM

What about using private/public keys instead of passwords? Search Google for passwordless ssh.

jlinkels 11-21-2007 05:53 AM

Berhanie is right, the way to this is public/private key.

However, what is the purpose of it? What does your script do after you have an SSH connection and you have a remote shell opened? What else can you do on a remote machine in a script?

If it is file transfer, consider sftp or rsync. If it is something else, wouldn't it be possible to run the script itself remotely?

Using an automated SSH login thru a script *is* a security hole, it is not for nothing that you always need to key in a password (you cannot store that), or have to use public/private keys so that passwordless is possible only from dedicated machines.


All times are GMT -5. The time now is 10:37 PM.