SSH
TODO: will need to properly organize this page and perhaps add filler text between the transcluded pages and also decided what pages should be transcluded here and which should not, at the moment the below is just a list of possible pages which could be relevant. It may even be desirable to edit the transcluded pages (i.e. reduce header sizes) to allow for better transclusion. |
<translate>
Connecting with MobaXterm works in basically the same way as PuTTY (see Connecting with PuTTY) however, there is more functionality combined into MobaXterm than PuTTY. MobaXterm has a built-in SFTP client to transfer files as well as a built-in X11 server to allow you to run graphical programs remotely without the need to install a third-party X11 server. If you have already been using PuTTY and have saved sessions, MobaXterm will use these saved sessions so that you do not have to re-enter the settings.
To connect to a machine which you have not previously connected to using MobaXterm or PuTTY go to Sessions->New session, select an "SSH" session, type in the remote host address and your USERNAME (note you may need to check the "Specify username" check box). Then click "OK". MobaXterm will then save that session information you just entered for future connections, and also open an SSH connection to the specified host, which will then request your password. Once your password is entered successfully you will now have a terminal you can type commands at as well as an SFTP client in the left pane which you can use to view files on the remote machine as well as transfer files to and from the remote machine by dragging and dropping files.
X11 Forwarding
To enable X11 forwarding to allow the use of graphical applications from the host machine:
- Ensure that X11 forwarding is enabled for a particular session by right clicking on the session and select "Edit Session". In the session settings window, select "Advanced SSH settings" and ensure that the "X11-Forwarding" checkbox is checked.
- Ensure that the Icon for the "X server" in the top right corner of the main window is green. If it isn't green that means that you do not currently have an X server running. To start, click on the red "X" icon.
- Test that X11 forwarding is working by opening the session by double-clicking the session on the "Sessions" pane on the left and entering your password. Then run a simple GUI-based program to test, such as typing the command
xclock
. If you see a popup window with a clock, X11 forwarding should be working.
Using a Key Pair
Right-click on the session in the left "Sessions" pane and select "Edit Session". In the session settings window, select "Advanced SSH settings" and check the "Use private key" checkbox. You can then click on the icon at the right of the text box to browse the file system and select a private key file to use. To create a key pair, see Generating SSH keys in Windows. </translate>
<translate>
Start up PuTTY and enter the host name or IP address of the machine you wish to connect to. You may also save a collection of settings by entering a session name in the Save Sessions text box and clicking the Save button. You can set the username to use when logging into a particular host under the Connection->Data section in the Auto-login username text box to saving typing the username when connecting.
X11 forwarding
If working with graphical-based programs, X11 forwarding should be enabled. To do this, go to Connection->SSH->X11 and check the Enable X11 forwarding checkbox. To use X11 forwarding one must install an X window server such as Xming or, for the recent versions of Windows, VcXsrv. The X window server should be actually started prior to connecting with SSH. Test that X11 forwarding is working by opening a PuTTY session and running a simple GUI-based program, such as typing the command xclock
. If you see a popup window with a clock, X11 forwarding should be working.
Using a key pair
To set the private key putty uses when connecting to a machine go to Connection->SSH->Auth and clicking the Browse button to find the private key file to use. Putty uses files with a .ppk suffix, which are generated using PuTTYGen (see Generating SSH keys in Windows for instructions on how to create such a key). In newer versions of Putty, you need to click the "+" sign next to Auth and then select Credentials to be able to browse for the Private key file for authentication. Note that the additional fields in that newer interface, i.e. Certificate to use and Plugin to provide authentication response, should be left blank. </translate> Generating ssh keys in Windows Using ssh keys in Linux Ssh keys