ssh scp 上傳下載文件

京東雲-C1

  scp username@servername:/path/filename
  例如scp codinglog@192.168.0.101:/home/kimi/test.txt  把192.168.0.101上的/home/kimi/test.txt
  的文件下載到當前目錄
  二、上傳本地文件到服務器
  scp /path/filename username@servername:/path  
  例如scp /var/www/test.php  codinglog@192.168.0.101:/var/www/  把本機/var/www/目錄下的test.php文件
  上傳到192.168.0.101這臺服務器上的/var/www/目錄中
 
  三、從服務器下載整個目錄
      scp -r username@servername:remote_dir/ local_dir/
    例如:scp -r codinglog@192.168.0.101 /home/kimi/test  /home/kimi/  
  四、上傳目錄到服務器
      scp  -r local_dir username@servername:remote_dir
      例如:
      scp -r test      codinglog@192.168.0.101:/var/www/   把當前目錄下的test目錄上傳到服務器
      的/var/www/ 目錄php

相關文章
相關標籤/搜索