从服务器复制到本地时 SCP 权限被拒绝

从服务器复制到本地时 SCP 权限被拒绝

因此,我正在设置 vpn,但在使用时不断收到权限被拒绝错误scp。我尝试了几种方法(我在网上找到的方法),但似乎没有任何帮助。

root@debian-512mb-fra1-01: scp root@server:textfilepath ~/Desktop << desktop of local machine
Permission denied (publickey).

@waltinator 将其从评论中移出,以便可以进行格式化。

debug1: Next authentication method: publickey 
debug1: Trying private key: /home/nizar/.ssh/id_rsa 
debug1: Trying private key: /home/nizar/.ssh/id_dsa 
debug1: Trying private key: /home/nizar/.ssh/id_ecdsa 
debug1: Trying private key: /home/nizar/.ssh/id_ed25519 
debug1: No more authentication methods to try. 
Permission denied (publickey). 
nizar@debian-512mb-fra1-01:~$   

相关内容