Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-21-2007, 12:35 AM   #1
LQ Newbie
Registered: Nov 2007
Posts: 4

Rep: Reputation: 0
Unhappy "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
Old 11-21-2007, 05:24 AM   #2
Senior Member
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
What about using private/public keys instead of passwords? Search Google for passwordless ssh.
Old 11-21-2007, 05:53 AM   #3
Senior Member
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,487

Rep: Reputation: 627Reputation: 627Reputation: 627Reputation: 627Reputation: 627Reputation: 627
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.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
No UTMPX entry, You must EXEC "login" for the lowest "shell" ooihc Solaris / OpenSolaris 7 03-12-2007 03:09 PM
shell scripting: "formatting" issue with text files eur0dad Programming 3 08-17-2006 11:50 AM
ssh login problem RedHat AS3 ("Did not receive identification string from") spaniel Linux - Security 1 07-03-2005 07:50 AM
shell scripting - using ${variable:=","} Steve Riley Linux - General 7 02-08-2005 06:07 AM
Shell Scripting: Users "**Never logged in**" cparker15 Linux - General 1 10-02-2003 04:48 PM

All times are GMT -5. The time now is 06:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration