1、使用scp命令传输
# 上传
wenqiang@wq ~ % scp -pr -P 22 nginx.yaml root@192.168.1.15:/tmp/
root@192.168.1.15's password:
nginx.yaml 100% 1736 332.4KB/s 00:00
# 下载
wenqiang@wq ~ % scp -pr -P 22 root@192.168.1.15:/tmp/nginx.yaml ./
root@192.168.1.15's password:
nginx.yaml 100% 1736 147.3KB/s 00:00
# 如果只允许秘钥登录linux需要scp指定秘钥
wenqiang@wq /tmp % scp -pr -P 22 -i id_rsa root@192.168.1.15:/root/nginx.yaml ./
Enter passphrase for key 'id_rsa':
nginx.yaml 100% 1736 94.3KB/s 00:00
2、使用lrzsz命令
不友好,设置太麻烦
3、使用FileZilla
如果私钥指定了密码在选择私钥时会让你输入密码并保存为.ppk结尾的文件
改为中文 FileZilla------设置------语言------chinese(Simplified)