admin管理员组文章数量:1026271
一、登录远程Linux服务器:
[c:\~]$ sftp root@192.168.233.136
1.1、回车进行认证:
1.2、登录成功:
二、上传文件到服务器:
2.1上传操作
拖拽待上传文件到当前窗口即可
另一种方式–使用命令:
sftp:/root> lcd E:\安装包\linux下\
Local directory is now E:\安装包\linux下\
sftp:/root> put jdk-7u80-linux-x64.tar.gz
Uploading jdk-7u80-linux-x64.tar.gz to remote:/root/jdk-7u80-linux-x64.tar.gz
sftp: sent 146 MB in 2.72 seconds
*注意:
界面可能会乱码,调一下界面显示语言的编码即可
因为我的windows是windows10中文版,默认编码是gbk,我把编码改成gbk就可以了
设置编码是这个按钮:*
三、从服务器下载文件到本地机器
切换到保存服务器下载文件的目录下再进行下载文件操作
sftp:/root> lcd D:\Temp
Local directory is now D:\Temp
sftp:/root> lpwd
Local directory is D:\Temp
sftp:/root> get apache-tomcat-8.0.47.tar.gz
Fetching /root/apache-tomcat-8.0.47.tar.gz to apache-tomcat-8.0.47.tar.gz
sftp: received 8.93 MB in 0.34 seconds
附:
参考命令:
1、
[c:\~]$ sftp
NAME
sftp - connects to a host to transfer files securely.
SYNOPSYS
sftp [user@]host [port]
OPTIONS
user Indicates the user's login name.
host Indicates the name, alias, or Internet address of the
remote host.
port Indicates a port number (address of an application).
If the port is not specified, the default ssh port
(22) is used.
2、
sftp:/root> help
bye finish your SFTP session
cd change your remote working directory
clear clear screen
exit finish your SFTP session
explore explore your local directory
get download a file from the server to your local machine
help give help
lcd change and/or print local working directory
lls list contents of a local directory
lpwd print your local working directory
ls list contents of a remote directory
mkdir create a directory on the remote server
mv move or rename a file on the remote server
put upload a file from your local machine to the server
pwd print your remote working directory
quit finish your SFTP session
rename move or rename a file on the remote server
rm delete a file
rmdir remove a directory on the remote server
一、登录远程Linux服务器:
[c:\~]$ sftp root@192.168.233.136
1.1、回车进行认证:
1.2、登录成功:
二、上传文件到服务器:
2.1上传操作
拖拽待上传文件到当前窗口即可
另一种方式–使用命令:
sftp:/root> lcd E:\安装包\linux下\
Local directory is now E:\安装包\linux下\
sftp:/root> put jdk-7u80-linux-x64.tar.gz
Uploading jdk-7u80-linux-x64.tar.gz to remote:/root/jdk-7u80-linux-x64.tar.gz
sftp: sent 146 MB in 2.72 seconds
*注意:
界面可能会乱码,调一下界面显示语言的编码即可
因为我的windows是windows10中文版,默认编码是gbk,我把编码改成gbk就可以了
设置编码是这个按钮:*
三、从服务器下载文件到本地机器
切换到保存服务器下载文件的目录下再进行下载文件操作
sftp:/root> lcd D:\Temp
Local directory is now D:\Temp
sftp:/root> lpwd
Local directory is D:\Temp
sftp:/root> get apache-tomcat-8.0.47.tar.gz
Fetching /root/apache-tomcat-8.0.47.tar.gz to apache-tomcat-8.0.47.tar.gz
sftp: received 8.93 MB in 0.34 seconds
附:
参考命令:
1、
[c:\~]$ sftp
NAME
sftp - connects to a host to transfer files securely.
SYNOPSYS
sftp [user@]host [port]
OPTIONS
user Indicates the user's login name.
host Indicates the name, alias, or Internet address of the
remote host.
port Indicates a port number (address of an application).
If the port is not specified, the default ssh port
(22) is used.
2、
sftp:/root> help
bye finish your SFTP session
cd change your remote working directory
clear clear screen
exit finish your SFTP session
explore explore your local directory
get download a file from the server to your local machine
help give help
lcd change and/or print local working directory
lls list contents of a local directory
lpwd print your local working directory
ls list contents of a remote directory
mkdir create a directory on the remote server
mv move or rename a file on the remote server
put upload a file from your local machine to the server
pwd print your remote working directory
quit finish your SFTP session
rename move or rename a file on the remote server
rm delete a file
rmdir remove a directory on the remote server
版权声明:本文标题:本地windows机器和远程Linux服务器之间文件传输 -- Xshell 使用sftp 上传下载文件 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/jiaocheng/1742416634a1961543.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论