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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM