Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 08-28-2003, 01:38 PM   #1
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?
Old 08-28-2003, 02:15 PM   #2
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:
Old 08-28-2003, 02:52 PM   #3
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
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/ REMOTEHOST:/home/USER/.ssh/authorized_keys2
(you will need to enter your password this one time)


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 04:05 PM
Shell scripts??? F_ANTHONY Programming 2 10-27-2004 06:28 PM
ssh using shell scripts Alek Linux - Networking 4 09-05-2003 01:28 PM
Shell scripts j0hn0n1 Linux - Software 1 01-03-2003 03:11 PM
Need Help with Shell Scripts!!!!!!!!!!! vicsharps Linux - Newbie 3 03-07-2002 09:05 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:01 PM.

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