Want to improve this question? Update the question so it's on-topic for Stack Overfl开发者_JAVA技巧ow.
Closed 11 years ago.
Improve this questionI am trying to use the scp
command but I'm getting the following error:
permission denied lost connection
I get this when I use scp
to copy a file from a master node to a slave node.
This is probably more like your error, ya?
Permission denied (publickey).
lost connection
The simplest problem is that you don't have permissions to access the directories specified on at least one end of the copy operation, or you may just have a bad login.
- You could try using
sudo chown -R *username*
to make sure you have rights to the target directories on both ends. - Check your directory specifications, make sure that you are using ~/Documents for instance instead of /Documents. Very different locations.
If you've got a bad login, I can't help you there, sorry. Try just ssh-ing into the target(s) make sure you can.
You could check out the manpage for more help
I think error in giving permission to folder which has the authorized_keys file
use chmod and set the permissions
精彩评论