LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-09-2015, 09:19 AM   #1
Darkyputz
LQ Newbie
 
Registered: Dec 2015
Posts: 26

Rep: Reputation: Disabled
SSH login without password not working


Hello out there...
This is my first threat here, so if i mess up with some rules, please be gentle...smile
I have to NAS devices...and i have root access to both of them.
And i want to do a rsync between them.
The Rsync command is clear...but i always get prompted for pass phrase...which makes it impossible to automate that via cron job
I already created the rsa key...and tried to get it into the authorized keys on the other NAS, but even after that...still pass phrase...
Tried this here:
"cat /root/.ssh/id_rsa.pub | ssh root@destinationip 'cat >> .ssh/authorized_keys'

And get:
"The authenticity of host 'dest ip (destip)' can't be established.
RSA key fingerprint is 35:60:b9:53:a4:08:fb:1a:be:7a:7d:b5:4f:ee:cc:2c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'destip' (RSA) to the list of known hosts.
root@destip's password:

Can someone give me a hint where the culprit could be?

Thx in advance

Last edited by Darkyputz; 12-09-2015 at 10:02 AM. Reason: RESOLVED
 
Old 12-09-2015, 09:30 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Improper permissions are usually the cause of this:
Code:
chmod 750 ~
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
On the destination machine
 
Old 12-09-2015, 09:32 AM   #3
Darkyputz
LQ Newbie
 
Registered: Dec 2015
Posts: 26

Original Poster
Rep: Reputation: Disabled
Thx...i will check that in a minute
 
Old 12-09-2015, 09:41 AM   #4
Darkyputz
LQ Newbie
 
Registered: Dec 2015
Posts: 26

Original Poster
Rep: Reputation: Disabled
Hello...
Just tried it...
That is the log of it:

login as: root
root@localip's password:
Last login: Wed Dec 9 09:27:24 2015 from jm-8
Last login: Wed Dec 9 10:34:17 2015 from jm-8 on pts/1
Linux Pro6bak 2.6.37.6.RNx86_64.2.4 #1 SMP Wed Aug 20 11:41:34 PDT 2014 x86_64 GNU/Linux
Pro6bak:~# cat /root/.ssh/id_rsa.pub | ssh root@destip 'cat >> .ssh/authorized_keys
Enter passphrase for key '/root/.ssh/id_rsa':
Pro6bak:~# ssh root@destip
Enter passphrase for key '/root/.ssh/id_rsa':

Welcome to ReadyNASOS 6.2.4

Last login: Tue Dec 8 15:22:17 2015 from 96.80.133.17
root@ReadyNas312:~# chmod 750 ~
root@ReadyNas312:~# chmod 700 ~/.ssh
root@ReadyNas312:~# chmod 600 ~/.ssh/authorized_keys
root@ReadyNas312:~# exit
logout
Connection to destip closed.
Pro6bak:~# ssh root@destip
Enter pass phrase for key '/root/.ssh/id_rsa':

Still pass phrase question...any ideas?
 
Old 12-09-2015, 09:45 AM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Now it's asking for the passphrase, not the password. You need to leave the passphrase prompt blank when you're creating the key.

You'll need to make a new key, this time just keep pressing enter through all of the prompts, then copy it over to the destination again.

Last edited by suicidaleggroll; 12-09-2015 at 09:46 AM.
 
Old 12-09-2015, 09:47 AM   #6
Darkyputz
LQ Newbie
 
Registered: Dec 2015
Posts: 26

Original Poster
Rep: Reputation: Disabled
Oh...ok...that could make a difference...
Will check that...one sec
 
Old 12-09-2015, 09:50 AM   #7
Darkyputz
LQ Newbie
 
Registered: Dec 2015
Posts: 26

Original Poster
Rep: Reputation: Disabled
You are my hero...
I don't know why i kept putting this pass phrase is...
Without it just works...

Thx so much...
 
Old 12-09-2015, 10:51 AM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Glad you got it sorted! SSH keys aren't too bad to set up and get going once you know the gotchas, the only issue is the complete and utter lack of any error logging, even with verbosity turned up. You have to know what the problem is, because for security reasons SSH is not going to tell you...a little annoying.
 
  


Reply



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
LXer: SSH login without password using SSH keys LXer Syndicated Linux News 0 09-21-2014 01:36 AM
Remote ssh login (passwords useless), and local login (using password) linuxStudent11 Linux - Security 1 01-09-2013 01:30 PM
SSH login without password not working as expected. linuxlover.chaitanya Linux - Security 4 05-05-2010 06:29 AM
[SOLVED] SSH login problem for additional users after password-less login setup uncle-c Linux - Newbie 3 02-10-2010 12:51 PM
SSH login not working following password change CaptainReboot Linux - Software 14 03-20-2008 06:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:54 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration