我认为自己对此还是很陌生,所以我会尽力解释我遇到的麻烦。我正在尝试将文件发送scp
到远程服务器,但我得到Permission denied (publickey)
. 当我使用详细 ( -v
)运行命令时,直到最后我都找不到任何错误。目标目录是我用于 scp 的用户的 rwx。帮助!
legoman@legoman-desktop:~$ sudo scp -v /home/legoman/Documents/index.html legoman@ip:/home/legoman/Documents
Executing: program /usr/bin/ssh host ip, user legoman, command scp -v -t /home/legoman/Documents
OpenSSH_8.3p1 Ubuntu-1ubuntu0.1, OpenSSL 1.1.1f 31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to ip [ip] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file …
Run Code Online (Sandbox Code Playgroud) scp ×1