Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi. I am about ready to pull my hair out. I am not sure what my problem is, but I worked on getting scp working for about a day and a half strait, and have gotten virtually no where.
I have 2 solaris servers. I will refer to the one I would like to scp to the "Server" and the one I am scp'ing from the "Client"
I generated keys on the server and the client using the command
ssh-keygen -t rsa -f /home/pmarshal/.ssh/id_rsa -N ""
On the server machine, I made a file in the .ssh dir called authorized_keys and added the public key from the client to it.
On the Clien machine, I added a file in the .ssh dir called known_hosts and aded the publick key of the server to it.
I also have a file on the client called server_pub that contains the public key of the server
I try to scp with the following command
scp -Bi srever_pub /home/pmarshal/temp/* pmarshal@server:/home/pmarshal/temp2If anyone could shed some light on what I am doing wrong, I would GREATLY appriciate it.
I can ssh, but it uses the keys in /usr/local/etc. (I know this because it takes the public key from there and sticks it in my known_hosts file)
Thanks again
Peter

I had some problems as well, but now it works and I know why.
as soon as normal ssh user@server works with a passwd known_hosts is OK.
1) take a look in your sshd config file (ex: /etc/ssh/sshd_config) to see what file it looks for as "AuthorizedKeysFile" this should be something like: "%h/.ssh/authorized_keys", where it doesn't matter which protocol version you use.
2) put the public key generated on your client in the homedir/.ssh of the user you want to use on the server and make sure it has the same name as specified in the config file (notice that on some servers you are not allowed to login as root). Then set the file permissions of the .ssh dir to 755 and of the authorized_keys file to 644.
I think this should help...

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |