Putty paste from clipboard. Putty how to use - putty ssh, hotkeys

Each time enter the password blindly to enter the server ( especially if it is "good", that is, long and not memorable) is extremely tedious. Therefore, the standard saving of a server connection session in PuTTY leaves much to be desired. And so you want to go to the server in one, maximum two clicks! This begs the question: How to run PuTTY with a password? And what is strange, there is an answer to this question. Even two! =)

Security Warning!

The data storage methods (login and password) described in this article are not safe!

If an unlimited circle of people has access to your computer, then it is better to refrain from using them, since the data will be stored in an open (unencrypted form)! Data will be transmitted over the network using the protocol selected in PuTTY, so there is only one threat: data can only be stolen from your computer while you are away for coffee and a croissant. ;)

Primary settings

In order to start PuTTY with a password, you must first save session settings in it. With these settings, further login to the remote server will be carried out.

Option one. Launching PuTTY with a password, running bat file with user data

For starters of course create a bat file. It’s probably worth naming the batch file somehow meaningfully and placing it in the place where it will always be at hand when you need to go to the server. After that write in it the following information:

Cd %ProgramFiles%\Putty\ start putty.exe -load SERVER_NAME -l USER_NAME -pw PASSWORD

To make it clear what these two lines mean:

  • cd - command to move through directories (then is an absolute path, so the batch file will be launched from any place where it will be, even from a flash drive)
  • %ProgramFiles% - operating system constant Windows systems, which is the absolute path to the Program Files folder. This folder has a space in its name. That is why this constant is used.
  • %ProgramFiles%\Putty\ - absolute path to the directory (standard when installing PuTTY), where the putty.exe program is located. Where they installed, there it lies. If elsewhere, given way you need to change to the one that you have on your computer
  • start- windows team to execute the file. If it is not specified, then two windows will open: one Windows consoles, the second PuTTY window itself with an open session with the server. Why should we leave open window windows console?
  • putty.exe - the actual file of the PuTTY program, which we run with the parameters:
    • -load - open the server specified in the SERVER_NAME parameter
    • -l - precedes the input of the username specified in the USER_NAME parameter

They entered everything, substituted their data, saved the changes in the bat-file. Now, by double-clicking, we launch the batch file and immediately get to the server under the user whose data is saved. Comfortable! =) But not safe (as I wrote above).

Option two. Launching PuTTY with a password, indicated in the label of the program putty.exe

As the name of this option implies, the first step is to create a program shortcut putty.exe . It makes sense to name the label in such a way to understand which session data is stored in it, so as not to get confused. Since the paths to the program in the shortcut are specified in absolute form, then label can be moved to the place where it will always be at hand and not be evident to those who want to steal the data stored in it ( login and password to the server).

After the shortcut is created, open its properties:

In the window that opens, on the tab " Label» into line « An object»Add data about our connection to the server in the form:

"C:\Program Files\PuTTY\putty.exe" [email protected] _NAME -pw PASSWORD

  • "C:\Program Files\PuTTY\putty.exe" - the path to the putty.exe program, written in quotes
  • USER_NAME - the username that we previously entered manually every time we entered the server
  • @ - icon like this =)
  • SERVER_NAME is the name of the server stored in the PuTTY sessions we are connecting to
  • -pw - precedes the user's password, which is specified in the PASSWORD parameter
  • PASSWORD - user password for logging into the remote server

And press the button " OK».

For security purposes, Wondows may ask you to confirm a change to the shortcut settings. Here you just have to agree. =)

That's all in general.

Conclusion

If the PuTTY sessions have saved data that matches the data saved in the shortcut and / or bat file, then when you start the batch file or double-click on the shortcut, the session will open immediately with the logged in user, which is extremely convenient, but not very safe, because. to. All data is stored in clear text.

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, the console displays a large number of information, 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 combination Shift keys+Insert, or you can just 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. For this it is necessary in command line Windows 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 a simpler and safe way authorization on 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 working on 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.

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 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

To copy 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 are using a mouse that has a middle button (or a clickable wheel), then paste the copied text into 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.

Internet