![]() PuTTY keeps track of text that has scrolled up off the top of the terminal. (If you have configured the middle mouse button to paste, then the right mouse button does this instead.) Click the button on the screen, and you can pick up the nearest end of the selection and drag it to somewhere else. If you have a middle mouse button, then you can use it to adjust an existing selection if you selected something slightly wrong. (You can also configure rectangular selection to be the default, and then holding down Alt gives the normal behaviour instead. If you want to select a rectangular region instead of selecting to the end of each line, you can do this by holding down Alt when you make your selection. (You can adjust precisely what PuTTY considers to be part of a word see section 4.11.6.) If you triple-click, or triple-click and drag, then PuTTY will select a whole line or sequence of lines. If you double-click, hold down the second click, and drag the mouse, PuTTY will select a sequence of whole words. If you double-click the left mouse button, PuTTY will select a whole word. There is nothing PuTTY can do about this.) (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. 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. 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.3). 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. When you let go of the button, the text is automatically copied to the clipboard. In order to copy text to the clipboard, you just click the left mouse button in the terminal window, and drag to select text. PuTTY's copy and paste works entirely with the mouse. Also, copy and paste uses the Windows clipboard, so that you can paste (for example) URLs into a web browser, or paste from a word processor or spreadsheet into your terminal session. Like most other terminal emulators, PuTTY allows you to copy and paste the text rather than having to type it again. Often in a PuTTY session you will find text on your terminal screen which you want to type in again. Nevertheless, there are a few more useful features available. Once you have worked your way through that and started a session, things should be reasonably simple after that. 3.1 During your sessionĪ lot of PuTTY's complexity and features are in the configuration panel. For extreme detail and reference purposes, chapter 4 is likely to contain more information. ![]() This chapter provides a general introduction to some more advanced features of PuTTY. Section 3.7.3: Standard command-line options.Section 3.7.1: Starting a session from the command line.Section 3.6: Making raw TCP connections.Section 3.5: Using port forwarding in SSH.Section 3.4: Using X11 forwarding in SSH.Section 3.3: Altering your character set configuration.Section 3.2: Creating a log file of your session.Section 3.1.2: Scrolling the screen back.Section 3.1.1: Copying and pasting text.In our example we will login to a Raspberry Pi then run the poweroff command to power down the Pi. Use SSH to log in to the remote machine, add “-t” to the end of the command, then insert the command that you wish to run and press Enter. ![]() Using the -t argument we can log in, run a command, wait for the output and then logout.Ģ. For example this could be a Raspberry Pi that we need to shutdown. Sometimes we just need to run a single command on a remote machine. How to run a command and close an SSH connection It is important to close an SSH session when not in use so you don’t accidentally send commands to it or leave it open should your computer be hacked. When finished with the SSH session, exit using CTRL+D or type exit and press Enter. ssh Type Yes if prompted to confirm the connection for the first time.ĥ. Enter the SSH command followed by the example below, our user was “pi” and the hostname was “raspberrypi.local”.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |