linux 機器之間 zssh, rz, sz互相傳輸 ( How to install zssh in Ubuntu 13.10 (Saucy))

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代碼  收藏代碼
  1. 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代碼  收藏代碼
  1. deb http://http.us.debian.org/debian squeeze main universe  

 

After any changes you should run

C代碼  收藏代碼
  1. sudo apt-get update  

 

You can now install as below.

 

Install zssh

 

C代碼  收藏代碼
  1. 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代碼  收藏代碼
  1. sudo apt-get remove zssh  
 

This will remove just the zssh package itself.

 

Uninstall zssh and dependencies

C代碼  收藏代碼
  1. 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代碼  收藏代碼
  1. sudo apt-get purge zssh  

 

Or again, like this:

C代碼  收藏代碼
  1. 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代碼  收藏代碼
  1. #zssh [email protected]  

 
好了,在進入後,你需要上傳文件的話。先

C代碼  收藏代碼
  1. #ctrl+@  
  2. zssh >//這裏切換到了本地機器  
  3. zssh>pwd //看一下本地機器的目錄在那  
  4. zssh>ls  //看一下有那些文件  
  5. zssh>sz 123.txt  //上傳本地機器的當前目錄的123.txt到遠程機器的當前目錄  

 
下載文件的話

Java代碼  收藏代碼
  1. #sz filename  //在遠程機器上,啓動sz, 準備發送文件  
  2. #看到一堆亂碼, 然後在  
  3. #ctrl+@  
  4. zssh > pwd  //看看在那個目錄,cd 切換到合適的目錄  
  5. zssh > rz //接住對應的文件  

 

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

來源:http://www.cnblogs.com/strikebone/p/3454679.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章