从linux远端下载文件到mac本地报错Connection refused

在linux上使用命令

scp PPPP_032549_587838109_video_20200512032550030.mp4 LX@192.168.199.151:/Users/xx下,报错

ssh: connect to host xx.xx.xx.xx Connection refused

lost connection

开始怀疑是linux上的ssh服务不正常,通过命令service sshd status,查看为active活跃状态,ping mac的ip地址也能ping通,把问题转向mac端

在mac端使用ssh localhost,报错ssh: connect to host localhost port 22: Connection refused

使用命令sudo systemsetup -f -setremotelogin on 报错setremotelogin: Turning Remote Login on or off requires Full Disk Access privileges.

 通过报错百度到原因可能是mac的隐私设置中终端sshd没有开启磁盘完全访问权限,勾选上在执行scp命令就可以上传下载文件了。

 

posted @ 2020-05-12 12:43  晓海乖乖  阅读(1653)  评论(0)    收藏  举报