Hprc banner tamu.png

Difference between revisions of "HPRC:Access:Windows"

From TAMU HPRC
Jump to: navigation, search
(23 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
== Access from Windows ==
 
== Access from Windows ==
 +
 
=== Using MobaXterm (Recommended) ===
 
=== Using MobaXterm (Recommended) ===
MobaXterm is an enhanced terminal for Windows with a built-in X11 server, tabbed SSH client, built-in file editor, SFTP functionality, and other useful features. It is available from: [http://mobaxterm.mobatek.net/download.html http://mobaxterm.mobatek.net/download.html]
+
[http://mobaxterm.mobatek.net/ MobaXterm] is an enhanced terminal for Windows with a built-in X11 server, tabbed SSH client, built-in file editor, SFTP functionality, and other useful features. You may download MobaXterm from: http://mobaxterm.mobatek.net/download.html
 +
 
 +
You will need to choose which license (free Home edition, or professional) and then select the Portable or Installer edition. The Installer edition works best on your personal machine, when you have the privileges to install software. The portable version may be necessary when using a lab workstation, for example. (Be sure to check if MobaXterm is already installed in the Windows Start menu.)
 +
 
 +
 
 +
==== Configuration ====
 +
 
 +
You may create saved sessions for connecting to '''ada.tamu.edu''' or other HPRC clusters, for your convenience. See http://mobaxterm.mobatek.net/documentation.html#1_2 for instructions. For example:
 +
 
 +
[[Image:Moba_ssh.png | 675px | center | MobaXterm SSH]]
 +
 
 +
 
 +
IMPORTANT: When asked if you would like to save your password, choose "'''No'''" to avoid potential security exploits.
 +
 
 +
[[Image:Moba_save-pw.png | 675px | center | MobaXterm save password]]
 +
 
 +
 
 +
 
 +
==== Two factor authentication ====
 +
 
 +
1. On the top left corner of MobaXterm window, click 'Session' button.<br>
 +
[[File:moba-0.png | 675px]]
 +
 
 +
2. You will be prompted with a window which asks for your session settings.
 +
 
 +
3. Enter the 'Remote Host' (e.g. ada.tamu.edu, terra.tamu.edu, etc.) you would like to connect to.
 +
 
 +
4. Select 'Specify', then enter your username (your NetID).
 +
 
 +
5. Enter the 'Port Number' 22 (the default should be 22).<br>
 +
[[File:moba-1.png | 675px]]
 +
 
 +
6. Press enter.
 +
 
 +
7. You will be prompt to authentication with Duo (either using mobile app, text message or call).
 +
 
 +
8. If you wish to open the session again, open the 'Session' tab on the left side of the screen and double-click the appropriate session to launch.<br>
 +
[[File:moba-2.png | 450px]]
 +
 
 +
 
 +
 
 +
 
 +
'''File Transfer'''
 +
 
 +
1. On the top left corner of MobaXterm window, click Session button.
 +
 
 +
2. Choose 'SFTP' session type.
 +
 
 +
3. Enter remote host (e.g. ada.tamu.edu, terra.tamu.edu, etc.) and username (your netID).
 +
 
 +
4. Go to 'Advanced Sftp settings' and check '2-steps authentication' checkbox.
 +
 
 +
5. After you select 'Ok', you will be prompted with Duo Authentication method (Push, Call, Text, Second device, etc). Select the appropriate option. '''Do not type your TAMU password.''' 
 +
 
 +
Example Duo Authentication methods (You won't see this, it is just to remind you of the format of Duo Authentication options)
 +
 
 +
<pre>
 +
Enter a passcode or select one of the following options:
 +
 
 +
1. Duo Push to XXX-XXX-1234
 +
2. Duo Push to iOS
 +
3. Phone call to XXX-XXX-1234
 +
</pre>
 +
'''Your Duo settings will be different'''
 +
 
 +
 
 +
 
 +
 
 +
==== File Transfers ====
 +
 
 +
On the left-hand side of the MobaXterm window, different tabs are available. The labels are written vertically. Choosing the "Sftp" tab will display a file tree of the remote machine to which you are connected, such as:
 +
 
 +
[[Image:Moba_file-explore.png | 675px | center | MobaXterm file explore]]
 +
 
 +
 
 +
You may choose files to edit with the built-in editor. You may also transfer files from your Windows machine to the remote cluster, and vice versa. Just drag a local file (from a Windows File Explorer window or similar program) to the SFTP file tree on the left side of the MobaXterm window.
 +
 
 +
 
 +
 
 +
==== Remote Display of Programs with Graphical Interfaces ====
 +
 
 +
By default, MobaXterm connections have X11 forwarding available. So, when you connect to '''ada.tamu.edu''' or other machine, you should be able to run an X-Windows program by simply typing the command. That will open the program in a new window behind the MobaXterm main window.
 +
 
 +
 
 +
 
 +
==== Running MobaXterm on Open Access Lab workstations ====
 +
 
 +
'''Verify MobaXterm is installed'''
 +
 
 +
After logging in to Open Access Labs (OAL) workstation, click on the magnifying glass to search for an installed program. As you start typing "MobaXterm", matching programs will be displayed on the left-hand side of the screen, above the search field.
 +
 
 +
[[Image:OAL_Find_MobaXterm.png | 600px | center | find MobaXterm on Open Access Lab workstation]]
  
You will need to choose which license (free Home edition, or professional) and then select the Portable or Installer edition. The Installer edition works best on your personal machine, when you have the privileges to install software. The portable version may be necessary when using a lab workstation, for example. (Be sure to check if MobaXterm is already installed in the Windows Start menu.)
+
Once you have started MobaXterm, click "Start local terminal" (as pictured above in '''Local Terminal''' section).  You may encounter an error such as the following:
  
==== Local Terminal ====
+
[[Image:Moba_roothome_error.png | 600px | center | MobaXterm permission error message]]
<ol>
 
<li>Open MobaXterm and start a local terminal:</li>
 
::[[File:Moba Start-local.png|800px]]
 
  
<li>From the local terminal, connect to the cluster using [[HPRC:SSH_Access | SSH]]:</li>
+
To solve this problem, you will need to change the location of the virtual "root" and "home" directories.  At the top of the MobaXterm window in the row of buttons, click "Settings" (the second to last on the right-hand side):
::[[File:Moba from-local.png|800px]]
 
</ol>
 
  
==== SSH Session ====
+
[[Image:Moba_settings.png | 600px | center | MobaXterm settings button]]
<ol>
 
<li>Open MobaXterm and open the Session settings:</li>
 
::[[File:Session.png|800px]]
 
  
<li>Enter the hostname in the &quot;Remote Host&quot; field, check the box for &quot;Specify username&quot; and enter the proper username for the cluster you are connecting to,  <code>ada.tamu.edu</code> in this case:
+
A settings dialog will open.  By default, the virtual root and home directories will be set to "'''''_MyDocuments_\MobaXterm\'''''" which lacks proper write permissions for the OAL workstations:
::[[File:Moba ssh.png|800px]]
 
<li> Once you click OK you will be prompted to enter your password. Enter the proper password for the cluster you are connecting to. </li> </ol>
 
  
=== Using PuTTY ===
+
[[Image:Moba_default_root_home.png | 600px | center | MobaXterm default root and home]]
[http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY] is a full-featured, SSH v1.x, v2.x compliant client for Windows. You can get PuTTY as well as PSCP (a tool for encrypted remote file transfer) at: [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html]
 
  
<ol>
+
Change both of these by clicking on the current values (with the little yellow folder on the right-hand side).  Scroll up to find the "'''''Temp'''''" folder, which is under the "'''''C:'''''" drive:
<li>After installing PuTTY, open PuTTY to get a window similar to the following:</li>
 
::[[Image:putty_main.ada.png|PuTTY main window]]
 
  
<li>Enter the host name of the remote machine you want to connect to,  <code>ada.tamu.edu</code> in this case. The settings we are configuring for this connection can be saved as a session profile by PuTTY if we give this session a name and click on the &quot;Save&quot; button on this initial window. We have called this session &quot;ada&quot;, but we will not yet save the profile since we still need to modify other parameters before we are ready to establish the connection.</li>
+
[[Image:Moba_choose_temp.png | 600px | center | MobaXterm choose C:\Temp]]
  
<li>Make sure the SSH parameters are correct. Click on SSH in the category tree (this is found under the &quot;Connection&quot; branch). Verify that the preferred SSH protocol version is &quot;2 only&quot; and the preferred encryption algorithm is AES.</li>
+
Once both have been changed, they should look like this:
::[[Image:putty_encryption.png|PuTTY encryption window]]
 
  
<li>Next, go to the &quot;Auth&quot; portion of the GUI and make sure that the settings are configured as follows:</li>
+
[[Image:Moba_temp_selected.png | 600px | center | MobaXterm root and home set to C:\Temp]]
::[[Image:putty_auth.png|PuTTY authentication window]]
 
  
<div id="Tunnels">
+
Once you click "OK", MobaXterm will need to restart to commit these changes:
<li>Next, in the &quot;Tunnels&quot; window, enable X11 forwarding:</li>
 
</div>
 
::[[Image:putty_tunnels.png|PuTTY tunnels window]]
 
  
<li>Since now we have configured all the parameters as we want them, we can go back to the sessions window and click on the &quot;Save&quot; button to save these settings under the session name of &quot;ada&quot;.</li>
+
[[Image:Moba_restart.png | 600px | center | MobaXterm restart]]
::[[Image:putty_main.ada.png|PuTTY main window with save]]
 
  
<li>To establish a connection to the cluster, we can now simply highlight the session and click on &quot;Open.&quot;</li>
 
  
<li>Finally, you should be presented with a window with a command line interface and will be asked to supply your login name and password:</li>
 
::[[Image:putty_login.ada.png|PuTTY login window|700px]]
 
<li>Enter the proper credentials for the cluster you are connecting to.</li></ol>
 
  
'''NOTE''': If this is the first time you are attempting to connect to the remote machine, PuTTY will warn you that it doesn't know the machine's public key and give you the option of continuing or not. Just click on &quot;Yes&quot;. Once this is done, you won't see this message again for this machine unless the public key on the remote machine changes for some reason.
 
  
=== Remote Display of Programs with Graphical Interfaces ===
+
==== Installing on Temp Drive of Open Access Lab workstation ====
MobaXterm has a built-in X11 server, no extra software is needed to display programs with graphical interfaces if you are using MobaXterm. If you are using PuTTY, you will need an X server like Xming.
 
  
Xming is an X Server for Microsoft Windows. Although the latest version requires a contribution (approximately $20 USD) there is also an older (free) '''Public Domain Release''' (version 6.9.0.31) which can be found at: [http://www.straightrunning.com/XmingNotes/ http://www.straightrunning.com/XmingNotes/]
+
'''Special Instructions'''
  
<ol>
+
Note: This only applies to an unusual circumstance.  In most cases, MobaXterm will already be installed on the OAL workstations. You will not need to do this on your personal computer or any computer for which you have privileges to install the software.
<li>After installing Xming (or Xming-mesa if you need OpenGL support), start Xming using the installed shortcut.</li>
 
  
<li>Make sure your desired PuTTY session is configured with X11 forwarding as described [[#Tunnels|above]]. </li>
+
If MobaXterm is not installed on an [http://oal.tamu.edu/ Open Access Lab] workstation, download the portable version and copy the programs to a folder in the '''C:\Temp''' folder, i.e., '''C:\Temp\Moba''' (you will need to create this folder first). From that folder, run the program '''MobaXterm_Portable_''version''.exe''' to start MobaXterm. Select "Settings" in the top menu and choose "global settings". In the "General" tab of the settings window, specify '''C:\Temp''' as the Persistent home directory and Persistent root ('''/''') directory:
  
<li>Login to the desired cluster via PuTTY.</li>
+
[[Image:Moba_choose_temp.png | 450px | center | MobaXterm choose C:\Temp]]
  
<li>Start an xterm window with the following command:</li>
+
Once you have completed this, you should be able to run the portable version from your home drive without error.
  
::<pre>xterm</pre> 
 
If a new xterm terminal window for the remote system pops up, then X11 forwarding is working correctly.</ol>
 
 
== File Transfer from Windows ==
 
== File Transfer from Windows ==
 
=== WinSCP ===
 
=== WinSCP ===
 +
 +
WinSCP is a graphical SCP, "point and click" encrypted remote file transfer client for Windows. It is built on top of a portion of the PuTTY source code. It can be downloaded from: [https://winscp.net/download/winscp577setup.exe https://winscp.net/download/winscp577setup.exe]. After downloading, double-click on the icon to begin the installation. Follow all the steps (it is a typical windows install wizard) and choose the "typical" install option when prompted. It should only take a few seconds to install the package. When done, a WinSCP icon should appear on the Desktop.
 +
 +
<ol>
 +
<li> Double-click the WinSCP icon to start WinSCP. The following window should appear. </li>
 +
::[[Image:winscp_session-new.png|WinSCP Session]]
 +
Type in the name of the system to which you seek to establish a connection as well as your username and account password for that remote machine. The port number field should contain "22" and the protocol should be set to "SFTP". Next, select the SSH branch from the options tree in the left portion of the window.
 +
 +
 +
<li>In the SSH portion of the GUI, AES encryption should be moved to the top by highlighting it and pressing the "Up" button until it is at the top of the selection policy. </li>
 +
::[[Image:winscp_ssh.png|WinSCP ssh]]
 +
 +
 +
<li>You can now save the settings you just adjusted by going back to the "Session" branch and clicking the "Save" button to get the following dialogue box: </li
 +
::[[Image:winscp_save-new.png|WinSCP Save]]
 +
 +
 +
<li>After this is done, go back to the SSH branch and click the "login" button at the bottom of the window. If this is the first time you have accessed this particular remote machine through WinSCP, you will see the following message: </li>
 +
::[[Image:winscp_hostkey.png|WinSCP Hostkey]]
 +
 +
<li>Click "Yes" to proceed. You will then see the following window: </li>
 +
::[[Image:winscp_main-new.png|WinSCP Main]]
 +
To move to the desired directories, use the navigation bars at the top. The local system is on the left and the remote system on the right. The toolbar at the bottom of the window contains function keys for performing copies, deletes, etc.
 +
 +
<li>Let's say you wanted to copy the file "sc08 template.ppt" from the local computer (left window) to the remote computer (right window). Click on the file "sc08 template.ppt" and hit the space bar to select the file "sc08 template.ppt". </li>
 +
 +
<li>Now, either press the F5 key or click the icon for "Copy" at the bottom of the window. You will be prompted for a confirmation:</li>
 +
::[[Image:winscp_copy.png|WinSCP Copy]]
 +
 +
<li>Finally, a transfer progress window will appear: </li>
 +
::[[Image:winscp_transfer.png|WinSCP Transfer]]
 +
</ol>
 +
 +
Depending on the size of the file(s) and the speed of your network connection, this could take a anywhere from a few seconds to several minutes. Many users at TAMU HPRC have very large files. Don't be surprised if a 2GB file takes tens of minutes to complete. When you are ready to disconnect from the remote system, press F10 or just exit from the program.
 +
 +
 +
=== MobaXterm ===
 +
 +
On the left-hand side of the MobaXterm window, different tabs are available. The labels are written vertically. Choosing the "Sftp" tab will display a file tree of the remote machine to which you are connected, such as:
 +
 +
[[Image:Moba_file-explore.png | 900px | center | MobaXterm file explore]]
 +
 +
 +
You may choose files to edit with the built-in editor. You may also transfer files from your Windows machine to the remote cluster, and vice versa. Just drag a local file (from a Windows File Explorer window or similar program) to the SFTP file tree on the left side of the MobaXterm window.
 +
 +
 +
[[ Category: HPRC ]]

Revision as of 14:48, 24 March 2020

Access from Windows

Using MobaXterm (Recommended)

MobaXterm is an enhanced terminal for Windows with a built-in X11 server, tabbed SSH client, built-in file editor, SFTP functionality, and other useful features. You may download MobaXterm from: http://mobaxterm.mobatek.net/download.html

You will need to choose which license (free Home edition, or professional) and then select the Portable or Installer edition. The Installer edition works best on your personal machine, when you have the privileges to install software. The portable version may be necessary when using a lab workstation, for example. (Be sure to check if MobaXterm is already installed in the Windows Start menu.)


Configuration

You may create saved sessions for connecting to ada.tamu.edu or other HPRC clusters, for your convenience. See http://mobaxterm.mobatek.net/documentation.html#1_2 for instructions. For example:

MobaXterm SSH


IMPORTANT: When asked if you would like to save your password, choose "No" to avoid potential security exploits.

MobaXterm save password


Two factor authentication

1. On the top left corner of MobaXterm window, click 'Session' button.
Moba-0.png

2. You will be prompted with a window which asks for your session settings.

3. Enter the 'Remote Host' (e.g. ada.tamu.edu, terra.tamu.edu, etc.) you would like to connect to.

4. Select 'Specify', then enter your username (your NetID).

5. Enter the 'Port Number' 22 (the default should be 22).
Moba-1.png

6. Press enter.

7. You will be prompt to authentication with Duo (either using mobile app, text message or call).

8. If you wish to open the session again, open the 'Session' tab on the left side of the screen and double-click the appropriate session to launch.
Moba-2.png



File Transfer

1. On the top left corner of MobaXterm window, click Session button.

2. Choose 'SFTP' session type.

3. Enter remote host (e.g. ada.tamu.edu, terra.tamu.edu, etc.) and username (your netID).

4. Go to 'Advanced Sftp settings' and check '2-steps authentication' checkbox.

5. After you select 'Ok', you will be prompted with Duo Authentication method (Push, Call, Text, Second device, etc). Select the appropriate option. Do not type your TAMU password.

Example Duo Authentication methods (You won't see this, it is just to remind you of the format of Duo Authentication options)

Enter a passcode or select one of the following options:

 1. Duo Push to XXX-XXX-1234
 2. Duo Push to iOS
 3. Phone call to XXX-XXX-1234

Your Duo settings will be different



File Transfers

On the left-hand side of the MobaXterm window, different tabs are available. The labels are written vertically. Choosing the "Sftp" tab will display a file tree of the remote machine to which you are connected, such as:

MobaXterm file explore


You may choose files to edit with the built-in editor. You may also transfer files from your Windows machine to the remote cluster, and vice versa. Just drag a local file (from a Windows File Explorer window or similar program) to the SFTP file tree on the left side of the MobaXterm window.


Remote Display of Programs with Graphical Interfaces

By default, MobaXterm connections have X11 forwarding available. So, when you connect to ada.tamu.edu or other machine, you should be able to run an X-Windows program by simply typing the command. That will open the program in a new window behind the MobaXterm main window.


Running MobaXterm on Open Access Lab workstations

Verify MobaXterm is installed

After logging in to Open Access Labs (OAL) workstation, click on the magnifying glass to search for an installed program. As you start typing "MobaXterm", matching programs will be displayed on the left-hand side of the screen, above the search field.

find MobaXterm on Open Access Lab workstation

Once you have started MobaXterm, click "Start local terminal" (as pictured above in Local Terminal section). You may encounter an error such as the following:

MobaXterm permission error message

To solve this problem, you will need to change the location of the virtual "root" and "home" directories. At the top of the MobaXterm window in the row of buttons, click "Settings" (the second to last on the right-hand side):

MobaXterm settings button

A settings dialog will open. By default, the virtual root and home directories will be set to "_MyDocuments_\MobaXterm\" which lacks proper write permissions for the OAL workstations:

MobaXterm default root and home

Change both of these by clicking on the current values (with the little yellow folder on the right-hand side). Scroll up to find the "Temp" folder, which is under the "C:" drive:

MobaXterm choose C:\Temp

Once both have been changed, they should look like this:

MobaXterm root and home set to C:\Temp

Once you click "OK", MobaXterm will need to restart to commit these changes:

MobaXterm restart



Installing on Temp Drive of Open Access Lab workstation

Special Instructions

Note: This only applies to an unusual circumstance. In most cases, MobaXterm will already be installed on the OAL workstations. You will not need to do this on your personal computer or any computer for which you have privileges to install the software.

If MobaXterm is not installed on an Open Access Lab workstation, download the portable version and copy the programs to a folder in the C:\Temp folder, i.e., C:\Temp\Moba (you will need to create this folder first). From that folder, run the program MobaXterm_Portable_version.exe to start MobaXterm. Select "Settings" in the top menu and choose "global settings". In the "General" tab of the settings window, specify C:\Temp as the Persistent home directory and Persistent root (/) directory:

MobaXterm choose C:\Temp

Once you have completed this, you should be able to run the portable version from your home drive without error.

File Transfer from Windows

WinSCP

WinSCP is a graphical SCP, "point and click" encrypted remote file transfer client for Windows. It is built on top of a portion of the PuTTY source code. It can be downloaded from: https://winscp.net/download/winscp577setup.exe. After downloading, double-click on the icon to begin the installation. Follow all the steps (it is a typical windows install wizard) and choose the "typical" install option when prompted. It should only take a few seconds to install the package. When done, a WinSCP icon should appear on the Desktop.

  1. Double-click the WinSCP icon to start WinSCP. The following window should appear.
  2. WinSCP Session

    Type in the name of the system to which you seek to establish a connection as well as your username and account password for that remote machine. The port number field should contain "22" and the protocol should be set to "SFTP". Next, select the SSH branch from the options tree in the left portion of the window.


  3. In the SSH portion of the GUI, AES encryption should be moved to the top by highlighting it and pressing the "Up" button until it is at the top of the selection policy.
  4. WinSCP ssh


  5. You can now save the settings you just adjusted by going back to the "Session" branch and clicking the "Save" button to get the following dialogue box: </li
    WinSCP Save
  6. After this is done, go back to the SSH branch and click the "login" button at the bottom of the window. If this is the first time you have accessed this particular remote machine through WinSCP, you will see the following message:
  7. WinSCP Hostkey
  8. Click "Yes" to proceed. You will then see the following window:
  9. WinSCP Main

    To move to the desired directories, use the navigation bars at the top. The local system is on the left and the remote system on the right. The toolbar at the bottom of the window contains function keys for performing copies, deletes, etc.

  10. Let's say you wanted to copy the file "sc08 template.ppt" from the local computer (left window) to the remote computer (right window). Click on the file "sc08 template.ppt" and hit the space bar to select the file "sc08 template.ppt".
  11. Now, either press the F5 key or click the icon for "Copy" at the bottom of the window. You will be prompted for a confirmation:
  12. WinSCP Copy
  13. Finally, a transfer progress window will appear:
  14. WinSCP Transfer

Depending on the size of the file(s) and the speed of your network connection, this could take a anywhere from a few seconds to several minutes. Many users at TAMU HPRC have very large files. Don't be surprised if a 2GB file takes tens of minutes to complete. When you are ready to disconnect from the remote system, press F10 or just exit from the program.


MobaXterm

On the left-hand side of the MobaXterm window, different tabs are available. The labels are written vertically. Choosing the "Sftp" tab will display a file tree of the remote machine to which you are connected, such as:

MobaXterm file explore


You may choose files to edit with the built-in editor. You may also transfer files from your Windows machine to the remote cluster, and vice versa. Just drag a local file (from a Windows File Explorer window or similar program) to the SFTP file tree on the left side of the MobaXterm window.