pscp from windows to fedora - server refused our key

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Im trying to use pscp to transfer files from my windows XP machine to
I generated my keys using puttygen, added it to the fedora box .ssh/
authorized_keys2 file.
I keep getting 'server refused our key' using the following line:

C:/bin/pscp -2 -scp -i C:/bin/id_rsa.ppk myfile.txt root@

Im using another fedora box with scp to transfer to the same account
just fine (with a
different key of course), so I believe the sshd_config settings are
just fine.  Ive checked
permissions on files etc, no luck.  Ive tried re-generating keys a
couple times and putting
the new key on the server, no luck.

Any other suggestions I could try to get this working?

Re: pscp from windows to fedora - server refused our key

Quoted text here. Click to load it

If you've already double-checked the permissions on ~, ~/.ssh and
~/.ssh/authorized_keys*, and already double-checked that you're
using the right one of authorized_keys and authorized_keys2, and
already double-checked that the public key is accurate and you
didn't make some sort of an editing error when copying it over, then
the best I can suggest is to look at the OpenSSH server logs
(requires root on the remote side) and see if it gives any
enlightening error messages.

(I often wish that OpenSSH could be persuaded to tell you what went
wrong with failed PK authentications. Obviously it'd be a security
hazard for it to do so before you've authenticated, as the old ssh-1
used to, but it could store some diagnostic messages internally and
send them on after you later authenticate successfully by other
means such as password. It'd save a lot of this sort of trouble, I
Simon Tatham         "What a caterpillar calls the end of the

Re: pscp from windows to fedora - server refused our key

Quoted text here. Click to load it

My log file (/var/log/messages) says:
sshd[554]: Failed password for root from port 2655 ssh2

To be sure, can you tell me what permissions I should have on each?
~ = drwr-xr-x
.ssh = drwxr--r--
authorized_keys2 = -rw---------

my sshd_config file:

Port 22
AddressFamily inet
#ListenAddress ::

# Disable legacy (protocol version 1) support in the server for new
# installations. In future the default will change to require explicit
# activation of protocol 1
Protocol 2

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

LoginGraceTime 30s
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
IgnoreUserKnownHosts yes
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/
MaxStartups 5
#PermitTunnel no

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem   sftp    /usr/libexec/sftp-server

Re: pscp from windows to fedora - server refused our key

Quoted text here. Click to load it

Ok a friend of mine helped me solve it, so stupid as it always is.
I was using the and appending it to authorized_keys2
instead of copying and pasting whats in the window in puttygen,
which tells me to copy/paste it!  On Fedora, I use the
file, which is why I assumed it was the same way on puttygen.

Maybe this will help someone else.

Site Timeline