开发者

scp error when copying files [closed]

开发者 https://www.devze.com 2023-02-28 17:25 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overfl开发者_JAVA技巧ow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overfl开发者_JAVA技巧ow.

Closed 11 years ago.

Improve this question

I 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.

  1. You could try using sudo chown -R *username* to make sure you have rights to the target directories on both ends.
  2. 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

0

精彩评论

暂无评论...
验证码 换一张
取 消