LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-28-2003, 02:38 PM   #1
Alek
LQ Newbie
 
Registered: Aug 2003
Posts: 8

Rep: Reputation: 0
Unhappy SSH using shell scripts


I want to ssh from one linux box called Linux1 to another linux box called Linux2 using a shell script. My question is: is there a way to script this so the ssh connection is made without the user intervention of entering the password?
Thanks
 
Old 08-28-2003, 03:15 PM   #2
devoyage
Member
 
Registered: Aug 2003
Distribution: many
Posts: 37

Rep: Reputation: 15
You can use public key authentication.

Either use an empty password, or use ssh-agent (with the latter, you must supply the password once before it will work.)

This is a very good tutorial on it:
http://cfm.gs.washington.edu/securit...client-pkauth/
 
Old 08-28-2003, 03:52 PM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
To set up passwordless logins:
1) login as USER on the client (where you want to connect from)
2) ssh-keygen -t dsa
(don't suppy a passphrase)
3) scp /home/USER/.ssh/id_dsa.pub REMOTEHOST:/home/USER/.ssh/authorized_keys2
(you will need to enter your password this one time)
4) ssh REMOTEHOST
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I Need shell scripts flyyy_82 Linux - Security 1 01-27-2005 05:05 PM
Shell scripts??? F_ANTHONY Programming 2 10-27-2004 07:28 PM
ssh using shell scripts Alek Linux - Networking 4 09-05-2003 02:28 PM
Shell scripts j0hn0n1 Linux - Software 1 01-03-2003 04:11 PM
Need Help with Shell Scripts!!!!!!!!!!! vicsharps Linux - Newbie 3 03-07-2002 10:05 PM


All times are GMT -5. The time now is 02:50 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