主要使用scp命令,加-r参数是传输目录从服务器下载文件scpusername@servername:/path/filename/var/www/local_dir(本地目录)之类的asscproot@192.168.0.101:/var/www/test.txt/var/www/test.txt下载192.168.0.101上/var/www/test.txt的文件到/var/www/local_dir(本地目录))并上传本地文件到服务器scp/path/filenameusername@servername:/path例如scp/var/www/test.phproot@192.168.0.101:/var/www/将test.php文件放在本地/var/www/目录上传到本服务器的/var/www/目录192.168.0.101从服务器下载整个目录scp-rusername@servername:/var/www/remote_dir/(远程目录)/var/www/local_dir(本地目录)例如:scp-rroot@192.168.0.101:/var/www/test/var/www/上传目录到服务器scp-rlocal_dirusername@servername:remote_dir例如:scp-rtestroot@192.168.0.101:/var/www/将当前目录下的test目录上传到服务器的/var/www/目录下
