Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passwordless SSH and SCP

Status
Not open for further replies.

eanda10

Programmer
Apr 9, 2002
141
US
I am trying to scp files and run ssh between 2 of my servers w/o entering a password each time
here are the steps that I followed but I am still being asked for a password can anyone advise where I went wrong?
1)I ran this command "ssh-keygen -t dsa"
2) Then I copied the ~/.ssh/id_dsa.pub to the remote server ~/.ssh/authorized_keys2


I am running RH 8.0 on both servers
Thanks
 
I solved my issue!!!

my problem was I was using copy and paste to transfer the .pub file this was appending a newline char. which was screwing up everything at the end I used cat through an ssh tunnel to transfer the file and now it works

command I used:
cat .ssh/id_rsa.pub | ssh username@targethost 'cat >> .ssh/authorized_keys'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top