How to save username and password in PuTTY. Clipboard operations in puTTY Putty paste from clipboard

  • 25.02.2022

PuTTY– software client for remote connection and configuration of Linux servers, Telnet terminals, network routers. Using PuTTY you can connect via SSH, Telnet, Rlogin network protocols 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, an SSH server must be configured on the side of the terminal equipment, port 22 must be open, and Firewall / Windows Firewall must be disabled on the local computer from which the connection is made.

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

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 shell access to a UNIX (or UNIX-like) system and was once popular with system administrators before network security became the ongoing issue it is today. 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 UNIX remote login protocol that 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 an 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 a good way to make your web hosting account "belong" to an attacker. Using a secure, encrypted protocol such as SSH is a much better option for such purposes.

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 and UNIX/Linux systems, 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.

Linux operating systems widely use the SSH protocol for remote access between machines. Its popularity is due to the simplicity, reliability and security of the connection. By connecting via SSH to a remote computer, you get the opportunity to execute any terminal commands on it, as if you were working on your own computer, even auto-completion and other auxiliary features work.

Sometimes it becomes necessary to connect to a remote Linux computer from Windows, but by default, there is no utility designed for this. There is a third party program called PuTTY and you can install it separately. In this article, we will look at how to use PuTTY to connect to Linux systems, and also talk about how PuTTY is configured for convenient use.

First you need to download the program installer. To do this, open the official website and click "You can download PuTTY here":

Then select the installer for your architecture, x86 or x64 and download it.

In the first step, click "next":

The installation folder can be left as default:

Components too:

Wait for the installation to complete:

Uncheck the "View README" and press "Finish":

Now let's move on to how work is done in PuTTY.

How to use PuTTY

1. Program interface

Immediately after launching the program from the start menu, you will see a graphical interface for its settings. After connecting, you will only see the terminal, but you can configure the program through a convenient interface.

Let's consider what these or those tabs of the program are responsible for, so that you can navigate what and where to look for. We have four tabs:

  • session- is responsible for connecting to a remote server, here we enter the connection parameters, port, address, and we can also save all putty settings so as not to configure each time again.
  • Terminal- allows you to enable or disable the capabilities of the terminal;
  • Window- setting the appearance of the window, color, font, encoding;
  • connection- setting connection parameters, encryption algorithm, compression, authentication keys, X11 and other parameters.

Each tab has several subsections, but we will not touch them now, but will go straight to practice and see how to connect putty to a remote host.

2. Connecting to a remote PuTTY computer

To connect to a remote computer via SSH, go to the tab "session", here in the field "host name" you need to write the ip address or hostname of the computer you want to connect to in the port field - you need to specify the port on which the SSH server is running, port 22 is used by default:

You will then need to enter your username and password. It is important to note that you will not be able to copy the login or password, you only need to enter it manually:

3. Saving the PuTTY session

In order not to enter ip and port every time, you can save this data as a session, for this, write a new name in the field "Saved Sessions", and then click the button "Save":

Now you can load the saved session by clicking the button "Load".

After the putty configuration is completed and all the parameters are set correctly, you can save the settings and not enter them several times.

4. Default username

You don't have to enter your username each time, to do this, go to the tab "Connection", then "Data" and in the field "Auto-login Username" write the username, for example, root:

The putty connection will now run as this user.

5. Authorization by ssh key in PuTTY

In order not to enter a password every time, you can configure authorization by key. In Linux, this feature is used very widely because it is convenient. The first step is to create a key. To do this, run the PuTTYgen utility and set the switch to "SSH-2RSA" click "Generate":

The key must be SSH-2 RSA, if not in the main window, select from the menu Key. Move your mouse to create enough entropy:

The key is ready, then, using the buttons "Save Public Key" And "Save Private Key" save both keys.

Here you need to press the button "Browse" and add the newly saved private key:

Next, back to the tab "session", select our save and click "Save" to save the settings. It remains only to send our public key to the server. To do this, log in to it with a password and paste the public key at the end of the /root/.ssh/authorized_keys file.

The key can be taken directly from the PuTTYgen window "Public key for pasting" or from a public key file:

That's it, now you can log out and log in again. This time the ssh putty connection will be made using our key. Don't forget to save your session settings so you don't have to choose a key each time. Now that you know how to use putty, let's take a look at file transfers.

5. Transfer files via scp in PuTTY

Not everyone knows, but PuTTY allows you to transfer files via ssh just like linux does with the scp utility. Press Win+R then type cmd to launch the command prompt.

The syntax for the pcsp utility is as follows:

pscp filepath options Username@ host : /path/to/file/on/remote/host

For example, we can send a file from the current folder to the user's /root/ folder:

pscp test.txt [email protected]:/root/

The -P option can be used to specify a remote port:

pscp -P 2250 test.txt [email protected]:/root/

And the load option allows you to load the saved PuTTY session settings:

pscp -load losst-2 test.txt [email protected]:/root/

Now you know how to use putty to transfer files.

conclusions

In this article, we looked at how to use PuTTY to perform Linux administration tasks on Windows. Sometimes situations happen that without ssh in windows there is nowhere, then this utility will be simply indispensable.

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 the right mouse button (as an option 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

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. The standard Windows key combinations Ctrl + C and Ctrl + V do not work here, and the usual menu with the "copy" and "paste" items is missing. This article will discuss the Linux Mint + Putty bundle, because. It was on this OS that this information was 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 hold down the left mouse button, select the desired 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 use a mouse that has a middle button (or a wheel that can be pressed), then you can paste the copied text in the right place (browser, text editor, local console, etc.) by simply pressing 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 paste 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 touch the surface of the touchpad with three fingers at the same time (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.