Tips for working effectively with Putty. How to save username and password in PuTTY Putty paste from clipboard

Good afternoon, here is a little memo for myself describing how to copy paste in PuTTY. The SS H protocol was designed as a secure, encrypted replacement for the RSH protocol. RSH is used for remote access shell to a UNIX (or UNIX-like) system and was once popular among system administrators before network security was constant problem which she is now. Now, thanks to SSH, it is possible to get reliability, using an encrypted protocol known for its versatility and security. Although OpenSSH is probably the most used SSH implementation in the world and PuTTY is the most used SSH client for the MS Windows platform.

Key features of PuTTY

Like OpenSSH, PuTTY is a very versatile tool for remotely accessing another computer. It is probably used more by people who need secure remote shell access on a UNIX or Linux system than for any other purpose, although this is only one of its many uses. PuTTY is more than just an SSH client. It supports all of the following protocols:

  • raw: The raw protocol is typically used for network debugging.
  • rlogin: This is an unencrypted remote login protocol UNIX system, which uses port 513 by default.
  • serial: The serial option is used to connect to a serial line. The most common purpose for this is to establish a serial connection between computers instead of Ethernet or other network connection.
  • SSH: As noted, SSH is an encrypted secure remote login protocol that uses port 22 by default.
  • Telnet: is an unencrypted remote access protocol. It usually uses port 23 and is available on many non-UNIX systems. Like rlogin, Telnet has declined in popularity due to privacy concerns.
  • In addition to the five protocols supported by PuTTY, it also supports features such as saved session configurations, session logging, language (language) settings, and proxy sessions.

Importance of SSH on Windows

Of course, there are a number of reasons to use a tool like PuTTY. But the most common targets are related to the SSH protocol. It's a terrible idea to connect to a web host over an unencrypted connection to manage web hosting and to transfer files. Using an unencrypted login is good way make your account web host "owned" by the attacker. Using a secure, encrypted protocol such as SSH for such purposes is much more the best option.

SSH via PuTTY offers a fast and easy way to securely access a UNIX shell environment from a Windows system. This is convenient not only because of the obvious need of some people to work with Windows systems and UNIX/Linux, but also for people who are forced to use Windows and want to access UNIX shell capabilities. As with OpenSSH, PuTTY can be used as a secure web proxy. PuTTY can be used to secure TortoiseSVN connections to a Subversion server.

Article content:

Linux has a wonderful ssh client, Putty, which is used by a huge number of administrators when it is necessary to log into the server, but when using it, you may encounter difficulties when performing operations with the clipboard. Standard for Windows combinations the Ctrl+C and Ctrl+V keys don't work here, and the usual menu with "copy" and "paste" items is missing. This article will discuss the connection Linux Mint+ Putty, because on this particular OS. this information and checked, but most likely the information will be relevant for Ubuntu similar systems.

How to copy text

In order to copy the desired text from the Putty console window, simply select it with the left mouse button. Those. just pinch left button mouse, select the required fragment, release the left button and that's it, it has already been copied to the clipboard.

How to insert text

Option 1 (using the mouse)

If you are using a mouse that has a middle button (or a clickable wheel), then paste the copied text in the right place (browser, text editor, local console, etc.) you can simply press this very middle button (wheel).

Option 2 (using the keyboard)

If you do not have such a mouse at your disposal, or if it is more convenient for you to use the so-called hot keys, then you can insert the selected text using the following key combination:
Shift+Insert

But this key combination will help you paste the copied text only in the Putty window itself. In order to paste the copied text to any other place, you must use the middle mouse button, as described above.

Option 3 (using touchpad)

What if you are using a laptop with a touchpad that only has two physical buttons? The answer is simple, you need to emulate pressing the middle mouse button on the touchpad. On my laptop, this is done as follows: we simultaneously touch the surface of the touchpad with three fingers (I saw an indication on the Internet that two are enough, but in my case it does not work) and without removing my fingers from the surface, press the left button of the touchpad. This option, like the first one, is suitable for pasting text from the buffer not only into the Putty console, but also to any other place.

PuTTYsoftware client remote connection and settings Linux servers, Telnet terminals, network routers. With PuTTY you can connect via network protocols SSH, Telnet, Rlogin to end hosts; configure devices via serial Com-port.

PuTTY how to use or connect via PuTTY SSH

We open the PuTTY program and in the “Session” category we specify the host name or IP address of the server, by default we use port 22. We write the session name and press the “Save” button, this is done so as not to re-enter the IP address each time the next time you connect to the server.

Before saving the connection, you need to click on the “Change” button in the “Windows” - “Appearance” category and select “Cyrillic” from the character set, then check the encoding in “Translation”, which should be set to UTF-8 - these settings will ensure correct display Cyrillic characters. Connection is set!

Note: to successfully connect to a server, terminal or network router on the side terminal equipment SSH server must be configured, port 22 open and on local computer from which you are connecting disable Firewall / Windows Firewall.

We try to connect to the SLES 12 SP1 x64 server by clicking on the "Open" button, as shown in the first figure. During the initial connection, a warning window will be displayed that the Putty program will write down the remote server encryption key, confirm by pressing the "YES" button.

A terminal window opens, where you need to enter your username and password to enter the system, after each entry, press the "Enter" key. When entering a password, characters are not displayed. A successful connection to the SSH server is due to the last login and the appearance of the hostname.

To control the system, you must use Unix commands, Cisco and others. For more convenient management of the Linux system, I recommend using MC - Midnight Commander (a file manager with a text interface).

An example of the output of the entered ls -ls command (shows a detailed output of the list of files, permissions, owner group, sizes of each file, date, etc.):

PuTTY hotkeys

The main and most important copy paste, to copy text from anywhere to the clipboard, you must press the Ctrl-C key combination and paste it into the PuTTY window using the Shift-Insert hotkeys or by pressing the right mouse button, thereby the text will be inserted into the console. If you need to copy/paste text in the PuTTY window itself, then simply select the text in the window and paste in the same way as above.

Ctrl+A - go to the beginning of the line

Ctrl+C - end the current command

Ctrl+D - termination of the session ("exit" command)

Ctrl + L - shift the screen, everything that was previously entered will move to the very top

Ctrl + P - display previously entered commands (pressing the Up / Down arrows)

Ctrl+U - delete line

Ctrl+W - delete one word on the current line

Ctrl+Z - stop the current command

Today, SSH is the most common protocol that allows you to quickly and securely connect to your servers for their configuration and other administrative tasks. In this article, we will look at the popular PuTTY SSH client that allows you to manage servers based on operating systems Linux/FreeBSD.

We will not tell you how to perform basic actions with the program in this article. And I suggest that you familiarize yourself with the settings and functions that will help you work with PuTTY more efficiently.

Increasing the number of terminal lines

Often, as a result of some actions, a large amount of information is displayed in the console, and you need to scroll through it. However, the default settings limit output to the last two hundred lines. To change this parameter, open the settings window, go to the Window category and change the Lines of scrollback parameter to a value that suits you, for example, 5000.

Useful hotkeys

Copying and pasting text

To copy text from the PuTTY console, you just need to select the text - it will automatically be copied to the clipboard. To paste text into the console, use the Shift + Insert key combination, or you can simply right-click in the console.

Editing an input command

Ctrl+A - move the cursor to the beginning of the input line
Ctrl+E - move the cursor to the end of the input line
Alt + F - move the cursor to the next word in the input line
Alt + B - move the cursor to the previous word in the input line

Ctrl+U - delete all characters preceding the cursor; convenient to use for complete removal printed command
Alt+BackSpace, Ctrl+W - delete the word preceding the cursor

Scrolling text

Of course, the most natural is scrolling with the mouse wheel. But scrolling with hotkeys is faster in many cases. If you want to increase the efficiency of your work, try it.

Shift+PageUp - scroll text up
Shift+PageDown - scroll text down
Ctrl+PageUp - Scroll up text line by line
Ctrl+PageDown - line-by-line text scroll down

Additionally

Ctrl+C - interrupt the execution of the current command
Ctrl+L - clear screen

Transferring PuTTY sessions to another computer

Imagine a situation where you need to transfer sessions created in PuTTY to another computer. The easiest way is to transfer the corresponding registry branch. To do this, in the command Windows line run the following command:

C:>regedit /e "%userprofile%\desktop\PuTTY.reg" HKEY_CURRENT_USER\Software\Simontatham

After that, the PuTTY.reg file will appear on the desktop, which must be transferred to another computer, run and agree with the import of the registry branch.

Authorization without using a password

If you are used to using a login-password combination to access the server, then I can offer you an easier and safer way to log in to your server. And if you have several servers, and the passwords are different everywhere, then this option will greatly simplify your life.

PuTTY supports public key authentication. You can generate a pair of keys: public and private. You place the public key on all servers where you want to authenticate using this method, and keep the private key in a safe place.

So, let's start setting up this authorization method.

Let's run the PuTTYgen program, which is installed with PuTTY.

In the next window, select the SSH-2 RSA key type. And specify the value 2048 in the Numbers of bits in a generated key field.

Then click Generate and move the cursor within the window until the progress bar is full.

Next, click Save public key and save the public key under the name id_rsa.pub. Click Save private key and save the private key under the name mykey.ppk, agreeing to save the key without using a password.

Now you need to copy the public key to the server. This can be done, for example, using the PSFTP utility, which is also installed with PuTTY.

Open the program and enter:

psftp> open youserver.ru
psftp> put id_rsa.pub /tmp/id_rsa.pub

ssh-keygen -i -f /tmp/id_rsa.pub >> /root/.ssh/authorized_keys

And finally, we launch Pageant.

After that, an icon will appear in the tray. Right-click on it and select AddKey. In the window that appears, add the private key mykey.ppk. That's all, from now on, when entering the server, the password will not be requested.

Other programs for working with SSH

If you have several servers and want to work with them more efficiently, then try a convenient "wrapper" for PuTTY - PuTTY Connection Manager. You can download it from here.

Bitvise SSH Client

This product is similar to PuTTY and its use should not cause problems. The main advantage of Bitvise SSH Client is the presence of a very convenient two-pane file manager operating under the SFTP protocol. The program is free and available for download from the official website.

SecureCRT

Paid alternative for those willing to part with $99. The client has more functionality than PuTTY. Among them, for example, the ability to create keys in the application itself, remember passwords, auto-connect to a remote server.

May 30, 2014 | Author: dd |

Of course, it's interesting when some knowledge is at the subcortex, at the level of instincts - yesterday at the forum they asked how to paste from the clipboard in the puTTY terminal client.

At first, the question even baffled, because. if abstracted from work, then you don’t even remember. It seems that you can insert into puTTY by right-clicking the mouse, but you can’t say for sure, because this is already at the level of reflexes. So I had to climb to check, at the same time, I fixed something on the server. Moreover, the person began to cry that he could not find any information on subjects in tyrnets. But I somehow know that in puTTY all copying and pasting is done through the mouse, and I was not born with this knowledge:

paste into puTTY from the clipboard - by clicking on right button mouse (as a variant of Shift+Insert);
copy to puTTY - select the text and left-click.

Only when pasting text, one must take into account the fact that if the next line is accidentally copied to the clipboard, the transition will follow the ENTER input and, as a result, the command will be launched for execution.

So yesterday, trying again, I had to constantly kill them from the processes.

Clipboard operations in puTTY, 5.3 out of 10 based on 9 ratings

Loading...
Top