首页 » Linux » sftp命令使用方法

sftp命令使用方法

 

要使用sftp第一步修改配置文件:/etc/ssh/ssh_config 插入subsystem-sftp sftp-server 。

保存修改,使用命令:

提示输入密码,验证成功之后出现 sftp> 提示符。

[root@localhost ssh]# vi ssh_config
[root@localhost ssh]# sftp [email protected]
Connecting to 192.168.80.236...
The authenticity of host '192.168.80.236 (192.168.80.236)' can't be established.
RSA key fingerprint is a1:45:61:1f:ec:7e:27:c8:6b:0f:b2:22:90:a0:87:08.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '192.168.80.236' (RSA) to the list of known hosts.
[email protected]'s password:
Permission denied, please try again.
[email protected]'s password:
sftp>

常用命令有:

quit -- 退出
ls -- 查看远程目录文件
cd -- 改变远程目录路径
lls -- 查看本地目录文件
lcd -- 改变本地目录路径
put -- 将本地文件上传到远程目录
get -- 下载远程目录文件到本地

原文链接:sftp命令使用方法,转载请注明来源!

0