美文网首页
scp 的使用

scp 的使用

作者: 北小卡 | 来源:发表于2019-04-12 21:35 被阅读0次

    问题:scp copy over ssh doesn't work - permission denied error, please?

    分析:
    Judging by your question, you have a local file you want to send to the destination server. So you have the right syntax which is good!
    If you're getting permission denied, then you're not using the correct username or something's amiss with the authentication. Most likely, it's because the sudo command only works locally, for starters, so it won't give you root on the remote box, so that's probably the problem. Make sure that the user you are logging in as on the remote server has write permissions to the location you're trying to write to.
    If the problem is the destinationuser doesn't have access to that location without sudo, move the file to the destinationuser's home folder then sudo mv the file from the shell on the other server to put it in the right location.

    解决:

    1. 可能没有对方没有写入的权限
      chmod 777 xxxx
    2. 没有安装sshd
      sudo apt-get install openssh-server

    相关文章

      网友评论

          本文标题:scp 的使用

          本文链接:https://www.haomeiwen.com/subject/fmznuftx.html