1 (edited by marquinos 2012-08-24 15:20:05)

Topic: SSH login without password [OK]

Hi!
I did these steps:
http://faq.tuxfamily.org/User/En#Upload … public_key
http://faq.tuxfamily.org/Backups/En#Web … _databases

From the shell rsnapshot is working, it creates the folder and download the files.
But in crontab it's not working, it creates the folder, but it isn't donwloading the files.
I think is a problem with the passphrase SSH. My computer always asks by the passphrase. I think all is OK as the Tuxfamily FAQ, but it's always asking by the passphrase.

In my Tuxfamily's home I have these files: ~/id_rsa.pub, ~/ssh_keys and ~/.ssh/authorized_keys, all them with the same contents.
Any idea, please? Thanks in advance!

Re: SSH login without password [OK]

I guess you forgot to chmod 600 your ssh_keys file, I did it for you, is it better ?

Sylvain

Re: SSH login without password [OK]

Thanks Sylvain :)
But not, it's not working yet. The system is asking by the SSH password.
I'm not doing this: http://faq.tuxfamily.org/User/En#Launch … ur_machine
Because the system is asking the SSH password in each season. Could be this?
In other way I think all it's OK :/
Thanks :)

Re: SSH login without password [OK]

Well, could you paste the output of ssh -v ?  Including the shell command.

Sylvain

Re: SSH login without password [OK]

Yes, of course :) http://paste.ubuntu.com/1161357/

Re: SSH login without password [OK]

Ermm, I assumed that was obvious, but I need the output during the connection process :-)

7 (edited by marquinos 2012-08-22 20:41:48)

Re: SSH login without password [OK]

LOL :P Sorry! http://paste.ubuntu.com/1161559/

Re: SSH login without password [OK]

Humm, server actually asks for your passphrase key, as told by "Enter passphrase for key '/home/costales/.ssh/id_rsa': ", so what is not working the way it should ?

Sylvain

Re: SSH login without password [OK]

The connection works perfect :)
I want to use rsnapshot for automatic backups.
If I use rsnapshot from the shell and all works perfect too.
The problem is when I use rsnapshot from crontab, rsnapshot is not downloading anything.
I think the problem is the SSH passphrase. I think that passphrase is stoping rsnapshot. Then, I want remove the SSH passphrase with a pair keys between TuxFamily and my computer.
Thanks in advance!

Re: SSH login without password [OK]

Well, then create a SSH key without a passphrase, this is the best way to achieve SSH login in cron jobs.

Sylvain

11 (edited by marquinos 2012-08-24 15:24:53)

Re: SSH login without password [OK]

That works :) Thanks gradator!
One question, can I use a .ssh/authorized_keys (for pair keys and get automatic login) file with TuxFamily? (I don't like very much has no password on the SSH key) :P

Re: SSH login without password [OK]

I don't understand what you said, the passphrase is a crypt key for your local private key, we don't know if your key have a passphrase or not.

Having the passphrase and its decrypt key in some script is exactly the same as having a key without a passphrase.

By the way, our ~/.ssh/authorized_keys is called ~/ssh_keys for historical reasons (workaround for some FTP clients not supporting dot files about a decade ago).

Sylvain

Re: SSH login without password [OK]

Sorry, my English isn't good, and it's complicate for me to explain this problem :)

I was reading posts like this http://remysharp.com/2007/01/22/ssh-without-a-password/
Then, I understand the next: If I have the ~/ssh_keys file with my public key in TuxFamily, I'll access from my computer without passprhase. Am I right? :)

Thanks Sylvain! :)

Re: SSH login without password [OK]

Yup, this is that.

Sylvain