A.Lap
A.Lap

Reputation: 11

scp is still requesting password

I want to copy big files from one linux server(SLES11) to another(SunOS) via bash scripting. I dont want to have a password promt so I used ssh-keygen to generate key about this connection.These are the steps I followed:

ssh-keygen -t rsa -b 2048
ssh-copy-id -i /home/username/.ssh/id_rsa.pub [email protected]
ssh -i id_rsa.pub [email protected]

After this scp command still requests password. I am not 'root' user in both servers. I changed permissions to 700 to the .ssh directory and 640 to the file authorized_keys in the remote server.

Upvotes: 0

Views: 917

Answers (1)

Jakuje
Jakuje

Reputation: 25956

ssh -i id_rsa.pub [email protected]

The -i argument accepts the private key, not the public one. You should use

ssh -i id_rsa [email protected]

If it will not help, please provide the errors you can see in the server log and in the client

Upvotes: 0

Related Questions