在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命令就可以上傳下載文件了。