Putty中的複製與粘貼

與Linux打交道,免不了要從Windows上SSH到Linux或者在Windows和Linux之間傳文件。平時我比較常用的就是SSH Secure Shell和Putty。

SSH Secure Shell有比較好用的文件傳輸GUI工具,但是終端工具不支持編碼選擇,一直受中文亂碼困擾,除非你更改服務器的編碼,另外版本比較舊了現在用的基本都是2003年的3.2.9版本。

由於SSH Secure Shell中文亂碼的原因,有時不得不使用Putty,但是一直比較鬱悶Putty下複製文字的方法,前段時間偶然看Putty的幫助文檔,看到以下內容:

PuTTY's copy and paste works entirely with the mouse. In order to copy text to the clipboard, you just click the left mouse button in the terminal window, and drag to select text. When you let go of the button, the text isautomatically copied to the clipboard. You do not need to press Ctrl-C or Ctrl-Ins; in fact, if you do press Ctrl-C, PuTTY will send a Ctrl-C character down your session to the server where it will probably cause a process to be interrupted.

Pasting is done using the right button (or the middle mouse button, if you have a three-button mouse and have set it up; see section 4.11.2). (Pressing Shift-Ins, or selecting ‘Paste’ from the Ctrl+right-click context menu, have the same effect.) When you click the right mouse button, PuTTY will read whatever is in the Windows clipboard and paste it into your session,exactly as if it had been typed at the keyboard. (Therefore, be careful of pasting formatted text into an editor that does automatic indenting; you may find that the spaces pasted from the clipboard plus the spaces added by the editor add up to too many spaces and ruin the formatting. There is nothing PuTTY can do about this.)

好吧,原來Putty裏,選擇即複製,右鍵即粘貼。另外Putty還提供自己的scp工具——pscp,以後可以把SSH Secure Shell丟角落裏,一心一意用Putty了。。。


另外推薦幾篇SSH相關的文章:

ssh隧道技術簡介

SSH原理與運用(一):遠程登錄

SSH原理與運用(二):遠程操作與端口轉發

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