Difference between revisions of "Connecting to HPC"
From Montana Tech High Performance Computing
(→For Windows) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 22: | Line 22: | ||
You will need to install a terminal emulator program to connect. There are many such programs[https://en.wikipedia.org/wiki/List_of_terminal_emulators], below are examples of using '''MobaXterm''' and '''Xshell'''. | You will need to install a terminal emulator program to connect. There are many such programs[https://en.wikipedia.org/wiki/List_of_terminal_emulators], below are examples of using '''MobaXterm''' and '''Xshell'''. | ||
− | '''Now in Windows 10, with the addition of native OpenSSH support, you can use the Command Prompt comes with Windows to connect to HPC.''' | + | '''Now in Windows 10, with the addition of native OpenSSH support, you can use the Command Prompt comes with Windows to connect to HPC. (Use the same command in the above section)''' |
=== Using MobaXterm (Recommended) === | === Using MobaXterm (Recommended) === | ||
Line 39: | Line 39: | ||
Then click '''Ok''' and you'll get a prompt to enter your password. | Then click '''Ok''' and you'll get a prompt to enter your password. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Graphical Display (optional)== | ==Graphical Display (optional)== | ||
Line 101: | Line 63: | ||
Once you logged in, you'll see some texts, including the logo and some notice.<br \> | Once you logged in, you'll see some texts, including the logo and some notice.<br \> | ||
At the bottom line, you'll see your cursor after a Unix prompt(possibly a dollar sign):<br \> | At the bottom line, you'll see your cursor after a Unix prompt(possibly a dollar sign):<br \> | ||
− | <code>[YourUserName@ | + | <code>[YourUserName@oredigger ~]$ ❚</code> |
The texts before the dollar sign include your username, computer name and your current directory name. For general purposes, these texts will be omitted in the following examples, like <code>$ ❚</code> | The texts before the dollar sign include your username, computer name and your current directory name. For general purposes, these texts will be omitted in the following examples, like <code>$ ❚</code> | ||
Line 130: | Line 92: | ||
When you login to HPC, you are directed to your default home directory, which generally has the following format: | When you login to HPC, you are directed to your default home directory, which generally has the following format: | ||
− | <code>/ | + | <code>/data1/YourAffiliationInstitution/YourUserName</code> |
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 13:16, 5 January 2022
You can use Secure Shell(SSH) to connect to HPC. Depending on the operating system of your computer, you have different options to get connected.
Contents
For Mac/Linux
You can directly use the Terminal application comes with your system to connect.
In your terminal, type the following command to connect via ssh:
ssh YourUserName@hpc.mtech.edu
You will then receive prompt to enter your password, similar to the following line.
YourUserName@hpc.mtech.edu's password:
You can then enter your password. Note: when you enter your password, nothing will display on the screen.
If you intend to use any applications with GUI interfaces (e.g. MATLAB, COMSOL), you will need to add the '-X' option when connecting:
ssh -X YourUserName@hpc.mtech.edu
For Windows
You will need to install a terminal emulator program to connect. There are many such programs[1], below are examples of using MobaXterm and Xshell.
Now in Windows 10, with the addition of native OpenSSH support, you can use the Command Prompt comes with Windows to connect to HPC. (Use the same command in the above section)
Using MobaXterm (Recommended)
MobaXterm[2] is a single application that has integrations of several tools, e.g., SSH, X11, FTP....
MobaXterm has a free Home Edition, and you download it here. Either the Portable version or the Installer version is fine.
- To connect to the HPC, you can either start a local terminal, and use the command
ssh YourUserName@hpc.mtech.edu
as detailed in the previous Mac/Linux section.
- Or you can click the Session button on the top left corner and choose SSH in the pop-up window. Then enter the HPC's address and your username as shown below:
Then click Ok and you'll get a prompt to enter your password.
Graphical Display (optional)
Within the Montana University System, the graphical display from hpc.mtech.edu can be redirected to your local PC if you install an X Server. The cygwin x-server (http://x.cygwin.com/ ) is free and works well. You will need to enable X11 forwarding before you login into hpc.mtech.edu - this is done in putty by selecting Connection-SSH-Tunnels and checking the Enable X11 forwarding box. Start the x-server before logging on and test by running "xeyes".
Transferring files between your computer and HPC
After you login to HPC, the files you created/saved is stored on HPC. You will need some tools to transfer files between your computer and HPC.
For Mac/Linux
You can directly use the scp
command in the terminal to do a file transfer, or you can use any FTP applications.
For Windows
You can use any FTP programs to transfer files. Just use hpc.mtech.edu as the host address, and provide your username and password. One FTP program is Xftp (free for home/school). You can get it at https://www.netsarang.com/products/xfp_overview.html
If you are logged in using Xshell, you can use the New File Transfer button in the toolbar (or the keyboard shortcut Ctrl+Alt+F) to open the file transfer. By default, in the popped up Xftp window, you'll see your Desktop directory on the left side and the directory you are at in Xshell on the right. You can then Right-Click any files or folders to transfer files.
For Mobaxterm, the FTP function is integrated. If you are logged in to HPC, you can choose the Sftp tab in the left sidebar to download/upload files. Or you can also start a SFTP session similar to the Mobaxterm tutorial above.
First Login
Once you logged in, you'll see some texts, including the logo and some notice.
At the bottom line, you'll see your cursor after a Unix prompt(possibly a dollar sign):
[YourUserName@oredigger ~]$ ❚
The texts before the dollar sign include your username, computer name and your current directory name. For general purposes, these texts will be omitted in the following examples, like $ ❚
Change your initial password
It's best to change your initial password the first time you log in. To do it, simply use the passwd command:
$ passwd
You will then get the following texts:
Changing password for user YourUserName.
Changing password for YourUserName.
(current) UNIX password: ❚
Enter your initial(current) password and press enter. You'll then be prompt to enter and retype new passoword:
New password:
Retype new password:
If change is successful, you'll get:
passwd: all authentication tokens updated successfully.
Your Home Directory
When you login to HPC, you are directed to your default home directory, which generally has the following format:
/data1/YourAffiliationInstitution/YourUserName