LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-29-2006, 09:30 AM   #1
Zetec
Member
 
Registered: Jul 2006
Distribution: Debian, Ubuntu, W7, openSUSE, Centos
Posts: 152

Rep: Reputation: 25
cwrsync ssh key problem


Afternoon,

I'm not having much luck with cwrsync on windows and my linux ubuntu box.

Im following the quide at http://www.rsync.net/resources/howto/windows_rsync.html

Which all seems fine, however when I get to the Uploading keys im having a problem.

My local ubuntu box is on 192.168.55.250. I've tried a few things now to upload the key. The method mentioned in the link above just won't connect.

So I've copied the key to the .ssh directory and done the following as root on my linux server (I copies het key accross via samba):

more ~/.ssh/newkey >> ~/.ssh/authorized_keys2
rm ~/.ssh/newkey

Now is that right? Is that the best way of manually importing keys?

I still then have the problem of now being able to connect via rsync and cwrsync with ssh. THis is my rsync script

rsync -e "ssh -i /cydrive/c/Documents and Settings/jon/.ssh/id_rsa" "/cygdrive/c/PHP" jon@192.168.55.250:backup

and

rsync -av "/cygdrive/c/PHP" jon@192.168.555.250:backup

Both of these scripts bring up a password prompt.

Any help would be much appreciated and I'm rather confused.

I can get a linux - linux box working so problem, it just seems to be cwrsync and windows.

TIA.

Jon
 
Old 09-29-2006, 11:42 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
more ~/.ssh/newkey >> ~/.ssh/authorized_keys2
This may not be correct. The ssh daemon is going to look for ~/.ssh/authorized_keys, so by adding that 2 on the end of it, you may be causing a problem. In general, an authorized_keys file can hold any number of keys, you just have to add them with a text editor or via a cat. First, make a backup of authorized_keys just in case, and then:

cat newkey authorized_keys_backup > authorized_keys

You then need to make sure that each key is on exactly one line in the text file. Not all Windows programs create keys on a single line (Putty is a prime example).
 
Old 09-29-2006, 01:33 PM   #3
Zetec
Member
 
Registered: Jul 2006
Distribution: Debian, Ubuntu, W7, openSUSE, Centos
Posts: 152

Original Poster
Rep: Reputation: 25
Hi,

Thanks for that. Ill try that out and report back.

Jon

EDIT: I tried that the cat alterations. I only have one key per line.

Am I adding the key in right? Coping it to the server then doing the above?

Last edited by Zetec; 09-29-2006 at 01:51 PM.
 
Old 09-29-2006, 02:22 PM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Yeah, copying the key to the server and then adding it to the authorized_keys file is the way to do it.

I would have a look in your log file (/var/log/syslog and /var/log/messages) on the server to see if sshd is complaining about anything when you try to connect from Windows.
 
Old 09-30-2006, 03:58 AM   #5
Zetec
Member
 
Registered: Jul 2006
Distribution: Debian, Ubuntu, W7, openSUSE, Centos
Posts: 152

Original Poster
Rep: Reputation: 25
Quote:
Originally Posted by Hangdog42
Yeah, copying the key to the server and then adding it to the authorized_keys file is the way to do it.

I would have a look in your log file (/var/log/syslog and /var/log/messages) on the server to see if sshd is complaining about anything when you try to connect from Windows.
A good idea. I'll take a look at the logs.

Its more of a windows problem than anything though.

Cheers

Jon
 
  


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
Ssh Key Problem Eazy-Snatch Linux - Networking 2 07-12-2006 06:47 AM
SSH RSA key problem taiwf Linux - General 3 05-21-2006 09:33 PM
ssh public key problem Lotharster Linux - Networking 3 12-28-2005 08:18 PM
SSH - Problem with Public Key Authentication HaPagan Linux - Security 5 11-28-2005 11:27 PM
really simple ssh/key problem paul_dundee Linux - Security 11 03-28-2005 03:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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