您的位置:首页 > 运维架构 > Linux

linux 机器之间 zssh, rz, sz互相传输 ( How to install zssh in Ubuntu 13.10 (Saucy))

2014-10-27 13:00 555 查看
zssh 用法是: 像用ssh命令一样用zssh登录主机; 在命令输入状态中按下ctrl+2(@键)进入zssh状态; $sz 本地文件名 [可选参数-be:二进制方式] 上传文件完成(我在用时输出了一些乱码,但没影响上传) 下载是反出来的,先sz文件再ctrl+2再输入rz

更新:在archlinux上安装zssh须在AUR中找包,安装时依赖没有解决好,还需要安装lrzsz,否则在下载文件时会报:execvp rz zssh,同时整个终端挂掉。

To install zssh just follow these instructions. which first check that the universe repository is enabled and then installs the package for you


To enable the universe Repository

Edit the
/etc/apt/sources.list
file as root

C代码


sudo gedit /etc/apt/sources.list

and make sure that the
universe
component is included in the source lines.

It should look like this

C代码


deb http://http.us.debian.org/debian squeeze main universe

After any changes you should run

C代码


sudo apt-get update

You can now install as below.



Install zssh

C代码


sudo apt-get install zssh

Which will install zssh and 4 dependencies.

lrzsz
openssh-client | telnet | telnet-ssl
libc6 (>= 2.4)
libreadline6 (>= 6.0)


Problems?

You can always uninstall zssh again by following these instructions.

ubuntu saucy install package



Uninstall just zssh

C代码


sudo apt-get remove zssh

This will remove just the zssh package itself.



Uninstall zssh and dependencies

C代码


sudo apt-get remove --auto-remove zssh

This will remove the zssh package and any other packages on which it alone depends.



Purging your config/data too

Purged config/data can not be restored by reinstalling the package.

If you also want to delete your local/config files for zssh then you should swap
remove
for
purge
like
this:

C代码


sudo apt-get purge zssh

Or again, like this:

C代码


sudo apt-get purge --auto-remove zssh

来源:installion.co.uk/ubuntu/saucy/universe/z/zssh/install.html‎

zssh的全名叫ZMODEM SSH.看名字就知道,使用的zmodem,我们习惯了SecureCRT,直接就可以用来发送文件,比使用scp方便很多。

zmodem协议方便主要表示在以下点

其一,不需要输入很长的命令和密码,直接使用rz,sz加文件名,就能实现文件的收发。速度还很快。

其二,在中转了一台主机时,要在目标主机和本地主机之类,要传送文件,scp相当的麻烦,需要输入多次命令用户密码.但sz直接可以穿透。

好了,讲使用,如下,和使用ssh完全一样,只是打命令时,变成了zssh

C代码


#zssh root@192.168.1.1

好了,在进入后,你需要上传文件的话。先

C代码


#ctrl+@

zssh >//这里切换到了本地机器

zssh>pwd //看一下本地机器的目录在那

zssh>ls //看一下有那些文件

zssh>sz 123.txt //上传本地机器的当前目录的123.txt到远程机器的当前目录

下载文件的话

Java代码


#sz filename //在远程机器上,启动sz, 准备发送文件

#看到一堆乱码, 然后在

#ctrl+@

zssh > pwd //看看在那个目录,cd 切换到合适的目录

zssh > rz //接住对应的文件

更多命令查看:http://zssh.sourceforge.net/

来源:/article/5988351.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: