[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Setting up prvate public keys for ssh



On Fri, Dec 02, 2005 at 07:02:47PM -0500, Amish Rughoonundon wrote:
> Hi,
> I have been trying to use sftp with cuteFTP 7.1 Pro. I set it up with SFTP 
> using SSH2 on port 22. I have also set the public and private keys. I want 
> to use this since for some reason when I use only username and password and 
> try to download multiple files, it asks me for the password continuously 
> for some reason. After setting up the public and private keys, if I try to 
> connect to the sshd on the debian machine it refuses to connect:
> 
> STATUS:> [12/2/2005 6:47:16 PM] Connecting to SFTP server 
> test.rh.rit.edu:22 (ip = 129.21.147.222)...
> 
> ERROR:> [12/2/2005 6:47:16 PM] No further authentication methods available.
> 
> ERROR:> [12/2/2005 6:47:16 PM] The requested operation failed for an 
> unknown reason.
> 
> ERROR:> [12/2/2005 6:47:16 PM] Can't connect to test.rh.rit.edu:22. SFTP21 
> error = #4.
> 
> STATUS:> [12/2/2005 6:47:16 PM] SFTP21 connection closed.
> 
> 
> I don't know if the problem is with cuteFTP or the ssh server on the debian 
> machine. I read the article at this website 
> "http://www.debian-administration.org/articles/152"; and did more or less 
> everything they said. That is:
> I did "ssh-keygen -t rsa" in my ~ directory
> I made sure the files "id_rsa.pub" and "id_rsa" were there in ~/.ssh/
> I also checked that the sshd_config file contains the lines:
> "RSAAuthentication yes"
> "PubkeyAuthentication yes"
> 
> and I manually copied the content of the public key file on my windows 
> machine into the file "~/.ssh/authorized_keys2"
> 
> and it still did not work. On a side note, does sshd print anything to log 
> files. If yes where is the log file located. Thanks a bunch.
> Amish 

Hi,

I'm not sure which way you are trying to connect, but here is what I did
to access my Debian machine from a Windows machine with WinSCP:

In Debian box in file /etc/ssh/sshd_config I have
AuthorizedKeysFile %h/.ssh/authorized_keys
PubkeyAuthentication yes

Don't forget to restart sshd, if you need to change something in the
config.

In my home dir in Debian box I have
.ssh/authorized_keys in which I put the public key of the RSA key pair
(id_rsa.pub)
~$ cat id_rsa.pub >> .ssh/authorized_keys

In Windows machice I start WinSCP and browse for the secret key of the
RSA key pair (id_rsa.ppk), which I have converted into ppk format
(id_rsa -> id_rsa.ppk) with puttygen.exe.

I'm not sure if cuteFTP can handle the RSA key in the openssh format.

In my configuration the sshd uses the syslog facility and you can get
more verbose output into the /var/log/syslog, if you set the LogLevel to
VERBOSE or DEBUG or even DEBUG3 in the /etc/ssh/sshd_config (see man
sshd_config for more details). Don't forget to restart sshd.

HTH,
Simo
-- 
:r ~/.signature

Attachment: signature.asc
Description: Digital signature


Reply to: