LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 11-20-2007, 11:35 PM   #1
sorav
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, 04:24 AM   #2
Berhanie
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, 04:53 AM   #3
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,053

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

jlinkels
 
  


Reply


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 02:09 PM
shell scripting: "formatting" issue with text files eur0dad Programming 3 08-17-2006 10:50 AM
ssh login problem RedHat AS3 ("Did not receive identification string from") spaniel Linux - Security 1 07-03-2005 06:50 AM
shell scripting - using ${variable:=","} Steve Riley Linux - General 7 02-08-2005 05:07 AM
Shell Scripting: Users "**Never logged in**" cparker15 Linux - General 1 10-02-2003 03:48 PM


All times are GMT -5. The time now is 05:26 AM.

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