<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hpcwiki.tudelft.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Koen+Mulderij</id>
	<title>hpcwiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://hpcwiki.tudelft.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Koen+Mulderij"/>
	<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Special:Contributions/Koen_Mulderij"/>
	<updated>2026-05-02T07:07:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=259</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=259"/>
		<updated>2021-12-22T13:47:04Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Linux */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access to the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection or when you want to use [[#Linux|X-forwarding]]&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console:&lt;br /&gt;
 [user@home]$ ssh -J &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
If your SSH-client doesn't support Jump hosts, you can first connect to the bastion server and then to the HPC:&lt;br /&gt;
&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
=== MobaXterm ===&lt;br /&gt;
MobaXterm is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has built-in support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
MobaXterm can also be used for displaying graphical applications. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*In the commandline windows (right)&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in&amp;lt;br&amp;gt;&lt;br /&gt;
The easiest way is:&lt;br /&gt;
 [user@home]$ ssh -J &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
When you have configured [[#SSH_Proxy_Support|SSH Proxy Support]] you can connect with:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=258</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=258"/>
		<updated>2021-12-22T13:42:43Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Command line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access to the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection or when you want to use [[#Linux|X-forwarding]]&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console:&lt;br /&gt;
 [user@home]$ ssh -J &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
If your SSH-client doesn't support Jump hosts, you can first connect to the bastion server and then to the HPC:&lt;br /&gt;
&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
=== MobaXterm ===&lt;br /&gt;
MobaXterm is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has built-in support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
MobaXterm can also be used for displaying graphical applications. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*In the commandline windows (right)&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
For a grahpical connection to an HPC server you will first have to configure [[#SSH_Proxy_Support|SSH Proxy Support]]&amp;lt;br&amp;gt;&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=256</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=256"/>
		<updated>2021-11-16T13:10:25Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Access to the commandline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access to the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection or when you want to use [[#Linux|X-forwarding]]&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
=== MobaXterm ===&lt;br /&gt;
MobaXterm is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has built-in support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
MobaXterm can also be used for displaying graphical applications. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*In the commandline windows (right)&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
For a grahpical connection to an HPC server you will first have to configure [[#SSH_Proxy_Support|SSH Proxy Support]]&amp;lt;br&amp;gt;&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=255</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=255"/>
		<updated>2021-11-16T13:02:44Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Linux */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access to the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
=== MobaXterm ===&lt;br /&gt;
MobaXterm is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has built-in support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
MobaXterm can also be used for displaying graphical applications. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*In the commandline windows (right)&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
For a grahpical connection to an HPC server you will first have to configure [[#SSH_Proxy_Support|SSH Proxy Support]]&amp;lt;br&amp;gt;&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=254</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=254"/>
		<updated>2021-11-16T13:02:20Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Linux */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access to the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
=== MobaXterm ===&lt;br /&gt;
MobaXterm is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has built-in support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
MobaXterm can also be used for displaying graphical applications. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*In the commandline windows (right)&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
For a grahpical connection to an HPC server you will first have to configure [[#SSH_Proxy_Support|SSH_Proxy_Support]]&amp;lt;br&amp;gt;&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=253</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=253"/>
		<updated>2021-11-16T13:01:50Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Linux */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access to the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
=== MobaXterm ===&lt;br /&gt;
MobaXterm is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has built-in support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
MobaXterm can also be used for displaying graphical applications. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*In the commandline windows (right)&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
For a grahpical connection to an HPC server you will first have to configure [[#SSH_Proxy_Support|SSH_Proxy_Support]]&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=252</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=252"/>
		<updated>2021-11-09T16:46:49Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access to the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
=== MobaXterm ===&lt;br /&gt;
MobaXterm is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has built-in support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
MobaXterm can also be used for displaying graphical applications. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*In the commandline windows (right)&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Main_Page&amp;diff=251</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Main_Page&amp;diff=251"/>
		<updated>2021-10-18T10:11:13Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;Welcome to the hpcwiki!&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This wiki is intended as a guide for the hpc clusters managed bij the ICT Department. If you have never used one of our clusters before, this is the place to start. Please note that this wiki is a work in progress, it may not yet be complete.&lt;br /&gt;
&lt;br /&gt;
[[Introduction]]&lt;br /&gt;
&lt;br /&gt;
[[How to log in|Access]] (How to log in and how to copy files)&lt;br /&gt;
&lt;br /&gt;
[[Remote_Access|Remote Access]] (How to connect from outside the TU Delft)&lt;br /&gt;
&lt;br /&gt;
[[The queue system]]&lt;br /&gt;
&lt;br /&gt;
[[More about queues and nodes]]&lt;br /&gt;
&lt;br /&gt;
[[How to run a job]] (Examples)&lt;br /&gt;
&lt;br /&gt;
[[Applications]]&lt;br /&gt;
&lt;br /&gt;
[[Software Environments]]&lt;br /&gt;
&lt;br /&gt;
[[Further reading]] (Where to find more information)&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=250</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=250"/>
		<updated>2021-10-18T10:10:07Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Starting from 9-Nov-2021 access to the HPC-clusters will be limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access to the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
=== MobaXterm ===&lt;br /&gt;
MobaXterm is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has built-in support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
MobaXterm can also be used for displaying graphical applications. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*In the commandline windows (right)&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=249</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=249"/>
		<updated>2021-10-12T17:12:16Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* MobaXterm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access to the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
=== MobaXterm ===&lt;br /&gt;
MobaXterm is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has built-in support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
MobaXterm can also be used for displaying graphical applications. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*In the commandline windows (right)&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=248</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=248"/>
		<updated>2021-10-12T17:11:45Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* MobaXterm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access to the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
=== MobaXterm ===&lt;br /&gt;
MobaXterm is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has build support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
MobaXterm can also be used for displaying graphical applications. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*In the commandline windows (right)&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=247</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=247"/>
		<updated>2021-10-12T17:11:30Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access to the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
=== MobaXterm ===&lt;br /&gt;
MobaXterm is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has build support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Installation and use is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
MobaXterm can also be used for displaying graphical applications. Configuration is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*In the commandline windows (right)&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=246</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=246"/>
		<updated>2021-10-12T17:10:18Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access to the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
=== MobaXterm ===&lt;br /&gt;
MobaXterm is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has build support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Installation and use is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
MobaXterm can also be used for displaying graphical applications. Installation and use is described in [[#MobaXterm|Access to the commandline -&amp;gt; MobaXterm]]&lt;br /&gt;
*In the commandline windows (right)&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=245</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=245"/>
		<updated>2021-10-12T16:54:54Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* MobaXterm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access to the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
=== MobaXterm ===&lt;br /&gt;
MobaXterm can also be used for commandline access. Installation and use is described in [[#Windows|How to display graphical applications -&amp;gt; Windows]]&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Installation and use is described in [[#Windows|How to display graphical applications -&amp;gt; Windows]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
'''MobaXterm''' is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has build support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
====Graphical====&lt;br /&gt;
*Right Window&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
====File transfer====&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=244</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=244"/>
		<updated>2021-10-12T16:54:34Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Access from the commandline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access to the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for commandline access. Installation and use is described in [[#Windows|How to display graphical applications -&amp;gt; Windows]]&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Installation and use is described in [[#Windows|How to display graphical applications -&amp;gt; Windows]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
'''MobaXterm''' is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has build support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
====Graphical====&lt;br /&gt;
*Right Window&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
====File transfer====&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=243</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=243"/>
		<updated>2021-10-12T16:35:51Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* PuTTY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access from the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Installation and use is described in [[#Windows|How to display graphical applications -&amp;gt; Windows]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
'''MobaXterm''' is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has build support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
====Graphical====&lt;br /&gt;
*Right Window&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
====File transfer====&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=242</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=242"/>
		<updated>2021-10-12T16:34:49Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Data on HPC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access from the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel traffic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== MobaXterm ====&lt;br /&gt;
MobaXterm can also be used for file transfers. Installation and use is described in [[#Windows|How to display graphical applications -&amp;gt; Windows]]&lt;br /&gt;
&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
'''MobaXterm''' is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has build support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
====Graphical====&lt;br /&gt;
*Right Window&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
====File transfer====&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=241</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=241"/>
		<updated>2021-10-12T16:29:38Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* How to display graphical applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access from the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel traffic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== FileZilla ====&lt;br /&gt;
For FileZilla to connect to HPC you will first need to '''configure and start''' a session to the bastion with [[#PuTTY|PuTTY]]. Make sure you have configured SSH portforwarding (Connection&amp;gt;SSH&amp;gt;Tunnels Settings)&lt;br /&gt;
*Edit &amp;gt; Settings&lt;br /&gt;
[[File:FileZilla01.png]]&lt;br /&gt;
*Connection &amp;gt; Generic Proxy&amp;lt;br&amp;gt;Type: Socks 5&amp;lt;br&amp;gt;Host: localhost&amp;lt;br&amp;gt;Port: 1080 (if you configured this in PuTTY portforwarding)&amp;lt;br&amp;gt;Exit with &amp;quot;OK&amp;quot;&lt;br /&gt;
[[File:FileZilla02.png]]&lt;br /&gt;
*File &amp;gt; Site Manager&lt;br /&gt;
[[File:FileZilla03.png]]&lt;br /&gt;
*Click &amp;quot;New Site&amp;quot;&amp;lt;br&amp;gt;Name &amp;amp; Host: linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Protocol: SFTP&amp;lt;br&amp;gt;Port: 22&amp;lt;br&amp;gt;Logon Type: Interactive (or &amp;quot;Normal&amp;quot;)&lt;br /&gt;
[[File:FileZilla04.png]]&lt;br /&gt;
*You can now &amp;quot;Connect&amp;quot;&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows ===&lt;br /&gt;
'''MobaXterm''' is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has build support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
====Graphical====&lt;br /&gt;
*Right Window&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
====File transfer====&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=240</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=240"/>
		<updated>2021-10-12T16:26:17Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Windows MobaXterm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access from the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel traffic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== FileZilla ====&lt;br /&gt;
For FileZilla to connect to HPC you will first need to '''configure and start''' a session to the bastion with [[#PuTTY|PuTTY]]. Make sure you have configured SSH portforwarding (Connection&amp;gt;SSH&amp;gt;Tunnels Settings)&lt;br /&gt;
*Edit &amp;gt; Settings&lt;br /&gt;
[[File:FileZilla01.png]]&lt;br /&gt;
*Connection &amp;gt; Generic Proxy&amp;lt;br&amp;gt;Type: Socks 5&amp;lt;br&amp;gt;Host: localhost&amp;lt;br&amp;gt;Port: 1080 (if you configured this in PuTTY portforwarding)&amp;lt;br&amp;gt;Exit with &amp;quot;OK&amp;quot;&lt;br /&gt;
[[File:FileZilla02.png]]&lt;br /&gt;
*File &amp;gt; Site Manager&lt;br /&gt;
[[File:FileZilla03.png]]&lt;br /&gt;
*Click &amp;quot;New Site&amp;quot;&amp;lt;br&amp;gt;Name &amp;amp; Host: linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Protocol: SFTP&amp;lt;br&amp;gt;Port: 22&amp;lt;br&amp;gt;Logon Type: Interactive (or &amp;quot;Normal&amp;quot;)&lt;br /&gt;
[[File:FileZilla04.png]]&lt;br /&gt;
*You can now &amp;quot;Connect&amp;quot;&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows MobaXterm ===&lt;br /&gt;
MobaXterm is a very versatile application. It can be used to connect to the commandline on HPC, display graphical applications and transfer files. It also has build support for using SSH-tunneling to connect through a bastion. You can download it from [https://mobaxterm.mobatek.net/ https://mobaxterm.mobatek.net/]. The '''free version''' has enough features for most users. The '''Portable edition''' can be run without installing (just unzip).&lt;br /&gt;
*Click the '''Session''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSession.png]]&lt;br /&gt;
*Click the '''SSH''' icon&amp;lt;br&amp;gt;[[File:MobaXterm_NewSSH.png]]&lt;br /&gt;
*Enter '''Remote host'''&amp;lt;br&amp;gt;Check '''Specify username'''&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;[[File:MobaXterm_Hostname.png]]&lt;br /&gt;
*tab: Network settings&amp;lt;br&amp;gt;Click '''SSH gateway (jump host)'''&amp;lt;br&amp;gt;[[File:MobaXterm_NewJumphost.png]]&lt;br /&gt;
*Enter linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Enter your NetID&amp;lt;br&amp;gt;Click '''OK'''&amp;lt;br&amp;gt;[[File:MobaXterm_Jumphost.png]]&lt;br /&gt;
*Click '''OK''' in the session settings to start connecting&amp;lt;br&amp;gt;You will be asked for your password&amp;lt;br&amp;gt;Enter your password on the console of hpcXX&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
====Graphical====&lt;br /&gt;
*Right Window&amp;lt;br&amp;gt;Test X-forwarding (Graphics) by running &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;You should see these eyes (following the cursor)&amp;lt;br&amp;gt;[[File:MobaXterm_Xeyes.png]]&lt;br /&gt;
====File transfer====&lt;br /&gt;
*Left Window&amp;lt;br&amp;gt;Download files with '''arrow down'''&amp;lt;br&amp;gt;Upload files with '''arrow up'''&amp;lt;br&amp;gt;[[File:MobaXterm_SFTP.png]]&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
There are several options for displaying graphical applications on a Windows system. A basic option is [http://www.straightrunning.com/XmingNotes/ Xming]. You can download it from: http://www.straightrunning.com/XmingNotes/ The site asks for a donation to use the latest version, but there is also a public domain version which can be used for free. Once you have installed it, you can find it in the usual place in the start menu.&amp;lt;br&amp;gt;Before you log in to an hpc cluster and run graphical applications, you need to start Xming first. It will not show much, only a small X in the system tray once it's running.&amp;lt;br&amp;gt;You also need to enable X forwarding in PuTTY for your connection to the bastion.&lt;br /&gt;
*Connection&amp;gt;SSH&amp;gt;X11&amp;lt;br&amp;gt;Check &amp;quot;Enable X11 Forwarding&amp;quot;&lt;br /&gt;
[[File:PuTTY_04.png]]&lt;br /&gt;
&lt;br /&gt;
From PuTTY on the bastion you can continue logging in to the hpc cluster, using &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to enable X-forwarding in that session.&lt;br /&gt;
&lt;br /&gt;
  ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
To check if X forwarding works, type &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that will follow the mouse pointer.&lt;br /&gt;
[[File:Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An alternative option for displaying graphical applications is Exceed, this is a commercial package for which the TU Delft has a license. It is not available by default on the standard Windows systems, but it can be installed upon request if you contact the servicedesk.&lt;br /&gt;
&lt;br /&gt;
A second alternative is [https://mobaxterm.mobatek.net/ MobaXterm], this is an all-in-one solution containing an ssh client, X server and more. You can download a free version from: https://mobaxterm.mobatek.net/download.html The free version has some limitations, but it's still perfectly usable in our environment.&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_SFTP.png&amp;diff=239</id>
		<title>File:MobaXterm SFTP.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_SFTP.png&amp;diff=239"/>
		<updated>2021-10-12T15:44:28Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_Xeyes.png&amp;diff=238</id>
		<title>File:MobaXterm Xeyes.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_Xeyes.png&amp;diff=238"/>
		<updated>2021-10-12T15:40:43Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_Jumphost.png&amp;diff=237</id>
		<title>File:MobaXterm Jumphost.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_Jumphost.png&amp;diff=237"/>
		<updated>2021-10-12T15:35:58Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_NewJumphost.png&amp;diff=236</id>
		<title>File:MobaXterm NewJumphost.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_NewJumphost.png&amp;diff=236"/>
		<updated>2021-10-12T15:35:30Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: Koen Mulderij uploaded a new version of &amp;amp;quot;File:MobaXterm NewJumphost.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_NewJumphost.png&amp;diff=235</id>
		<title>File:MobaXterm NewJumphost.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_NewJumphost.png&amp;diff=235"/>
		<updated>2021-10-12T15:34:19Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_Hostname.png&amp;diff=234</id>
		<title>File:MobaXterm Hostname.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_Hostname.png&amp;diff=234"/>
		<updated>2021-10-12T15:33:22Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_NewSSH.png&amp;diff=233</id>
		<title>File:MobaXterm NewSSH.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_NewSSH.png&amp;diff=233"/>
		<updated>2021-10-12T15:31:42Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_NewSession.png&amp;diff=232</id>
		<title>File:MobaXterm NewSession.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:MobaXterm_NewSession.png&amp;diff=232"/>
		<updated>2021-10-12T15:31:02Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=231</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=231"/>
		<updated>2021-10-12T14:34:12Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* How to display graphical applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access from the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel traffic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== FileZilla ====&lt;br /&gt;
For FileZilla to connect to HPC you will first need to '''configure and start''' a session to the bastion with [[#PuTTY|PuTTY]]. Make sure you have configured SSH portforwarding (Connection&amp;gt;SSH&amp;gt;Tunnels Settings)&lt;br /&gt;
*Edit &amp;gt; Settings&lt;br /&gt;
[[File:FileZilla01.png]]&lt;br /&gt;
*Connection &amp;gt; Generic Proxy&amp;lt;br&amp;gt;Type: Socks 5&amp;lt;br&amp;gt;Host: localhost&amp;lt;br&amp;gt;Port: 1080 (if you configured this in PuTTY portforwarding)&amp;lt;br&amp;gt;Exit with &amp;quot;OK&amp;quot;&lt;br /&gt;
[[File:FileZilla02.png]]&lt;br /&gt;
*File &amp;gt; Site Manager&lt;br /&gt;
[[File:FileZilla03.png]]&lt;br /&gt;
*Click &amp;quot;New Site&amp;quot;&amp;lt;br&amp;gt;Name &amp;amp; Host: linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Protocol: SFTP&amp;lt;br&amp;gt;Port: 22&amp;lt;br&amp;gt;Logon Type: Interactive (or &amp;quot;Normal&amp;quot;)&lt;br /&gt;
[[File:FileZilla04.png]]&lt;br /&gt;
*You can now &amp;quot;Connect&amp;quot;&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
=== Windows MobaXterm ===&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
There are several options for displaying graphical applications on a Windows system. A basic option is [http://www.straightrunning.com/XmingNotes/ Xming]. You can download it from: http://www.straightrunning.com/XmingNotes/ The site asks for a donation to use the latest version, but there is also a public domain version which can be used for free. Once you have installed it, you can find it in the usual place in the start menu.&amp;lt;br&amp;gt;Before you log in to an hpc cluster and run graphical applications, you need to start Xming first. It will not show much, only a small X in the system tray once it's running.&amp;lt;br&amp;gt;You also need to enable X forwarding in PuTTY for your connection to the bastion.&lt;br /&gt;
*Connection&amp;gt;SSH&amp;gt;X11&amp;lt;br&amp;gt;Check &amp;quot;Enable X11 Forwarding&amp;quot;&lt;br /&gt;
[[File:PuTTY_04.png]]&lt;br /&gt;
&lt;br /&gt;
From PuTTY on the bastion you can continue logging in to the hpc cluster, using &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to enable X-forwarding in that session.&lt;br /&gt;
&lt;br /&gt;
  ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
To check if X forwarding works, type &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that will follow the mouse pointer.&lt;br /&gt;
[[File:Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An alternative option for displaying graphical applications is Exceed, this is a commercial package for which the TU Delft has a license. It is not available by default on the standard Windows systems, but it can be installed upon request if you contact the servicedesk.&lt;br /&gt;
&lt;br /&gt;
A second alternative is [https://mobaxterm.mobatek.net/ MobaXterm], this is an all-in-one solution containing an ssh client, X server and more. You can download a free version from: https://mobaxterm.mobatek.net/download.html The free version has some limitations, but it's still perfectly usable in our environment.&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=230</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=230"/>
		<updated>2021-10-12T14:32:36Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Command line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access from the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel traffic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== FileZilla ====&lt;br /&gt;
For FileZilla to connect to HPC you will first need to '''configure and start''' a session to the bastion with [[#PuTTY|PuTTY]]. Make sure you have configured SSH portforwarding (Connection&amp;gt;SSH&amp;gt;Tunnels Settings)&lt;br /&gt;
*Edit &amp;gt; Settings&lt;br /&gt;
[[File:FileZilla01.png]]&lt;br /&gt;
*Connection &amp;gt; Generic Proxy&amp;lt;br&amp;gt;Type: Socks 5&amp;lt;br&amp;gt;Host: localhost&amp;lt;br&amp;gt;Port: 1080 (if you configured this in PuTTY portforwarding)&amp;lt;br&amp;gt;Exit with &amp;quot;OK&amp;quot;&lt;br /&gt;
[[File:FileZilla02.png]]&lt;br /&gt;
*File &amp;gt; Site Manager&lt;br /&gt;
[[File:FileZilla03.png]]&lt;br /&gt;
*Click &amp;quot;New Site&amp;quot;&amp;lt;br&amp;gt;Name &amp;amp; Host: linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Protocol: SFTP&amp;lt;br&amp;gt;Port: 22&amp;lt;br&amp;gt;Logon Type: Interactive (or &amp;quot;Normal&amp;quot;)&lt;br /&gt;
[[File:FileZilla04.png]]&lt;br /&gt;
*You can now &amp;quot;Connect&amp;quot;&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
There are several options for displaying graphical applications on a Windows system. A basic option is [http://www.straightrunning.com/XmingNotes/ Xming]. You can download it from: http://www.straightrunning.com/XmingNotes/ The site asks for a donation to use the latest version, but there is also a public domain version which can be used for free. Once you have installed it, you can find it in the usual place in the start menu.&amp;lt;br&amp;gt;Before you log in to an hpc cluster and run graphical applications, you need to start Xming first. It will not show much, only a small X in the system tray once it's running.&amp;lt;br&amp;gt;You also need to enable X forwarding in PuTTY for your connection to the bastion.&lt;br /&gt;
*Connection&amp;gt;SSH&amp;gt;X11&amp;lt;br&amp;gt;Check &amp;quot;Enable X11 Forwarding&amp;quot;&lt;br /&gt;
[[File:PuTTY_04.png]]&lt;br /&gt;
&lt;br /&gt;
From PuTTY on the bastion you can continue logging in to the hpc cluster, using &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to enable X-forwarding in that session.&lt;br /&gt;
&lt;br /&gt;
  ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
To check if X forwarding works, type &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that will follow the mouse pointer.&lt;br /&gt;
[[File:Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An alternative option for displaying graphical applications is Exceed, this is a commercial package for which the TU Delft has a license. It is not available by default on the standard Windows systems, but it can be installed upon request if you contact the servicedesk.&lt;br /&gt;
&lt;br /&gt;
A second alternative is [https://mobaxterm.mobatek.net/ MobaXterm], this is an all-in-one solution containing an ssh client, X server and more. You can download a free version from: https://mobaxterm.mobatek.net/download.html The free version has some limitations, but it's still perfectly usable in our environment.&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=229</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=229"/>
		<updated>2021-10-12T14:30:24Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access from the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel traffic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== FileZilla ====&lt;br /&gt;
For FileZilla to connect to HPC you will first need to '''configure and start''' a session to the bastion with [[#PuTTY|PuTTY]]. Make sure you have configured SSH portforwarding (Connection&amp;gt;SSH&amp;gt;Tunnels Settings)&lt;br /&gt;
*Edit &amp;gt; Settings&lt;br /&gt;
[[File:FileZilla01.png]]&lt;br /&gt;
*Connection &amp;gt; Generic Proxy&amp;lt;br&amp;gt;Type: Socks 5&amp;lt;br&amp;gt;Host: localhost&amp;lt;br&amp;gt;Port: 1080 (if you configured this in PuTTY portforwarding)&amp;lt;br&amp;gt;Exit with &amp;quot;OK&amp;quot;&lt;br /&gt;
[[File:FileZilla02.png]]&lt;br /&gt;
*File &amp;gt; Site Manager&lt;br /&gt;
[[File:FileZilla03.png]]&lt;br /&gt;
*Click &amp;quot;New Site&amp;quot;&amp;lt;br&amp;gt;Name &amp;amp; Host: linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Protocol: SFTP&amp;lt;br&amp;gt;Port: 22&amp;lt;br&amp;gt;Logon Type: Interactive (or &amp;quot;Normal&amp;quot;)&lt;br /&gt;
[[File:FileZilla04.png]]&lt;br /&gt;
*You can now &amp;quot;Connect&amp;quot;&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
There are several options for displaying graphical applications on a Windows system. A basic option is [http://www.straightrunning.com/XmingNotes/ Xming]. You can download it from: http://www.straightrunning.com/XmingNotes/ The site asks for a donation to use the latest version, but there is also a public domain version which can be used for free. Once you have installed it, you can find it in the usual place in the start menu.&amp;lt;br&amp;gt;Before you log in to an hpc cluster and run graphical applications, you need to start Xming first. It will not show much, only a small X in the system tray once it's running.&amp;lt;br&amp;gt;You also need to enable X forwarding in PuTTY for your connection to the bastion.&lt;br /&gt;
*Connection&amp;gt;SSH&amp;gt;X11&amp;lt;br&amp;gt;Check &amp;quot;Enable X11 Forwarding&amp;quot;&lt;br /&gt;
[[File:PuTTY_04.png]]&lt;br /&gt;
&lt;br /&gt;
From PuTTY on the bastion you can continue logging in to the hpc cluster, using &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to enable X-forwarding in that session.&lt;br /&gt;
&lt;br /&gt;
  ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
To check if X forwarding works, type &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that will follow the mouse pointer.&lt;br /&gt;
[[File:Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An alternative option for displaying graphical applications is Exceed, this is a commercial package for which the TU Delft has a license. It is not available by default on the standard Windows systems, but it can be installed upon request if you contact the servicedesk.&lt;br /&gt;
&lt;br /&gt;
A second alternative is [https://mobaxterm.mobatek.net/ MobaXterm], this is an all-in-one solution containing an ssh client, X server and more. You can download a free version from: https://mobaxterm.mobatek.net/download.html The free version has some limitations, but it's still perfectly usable in our environment.&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=228</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=228"/>
		<updated>2021-10-12T10:54:53Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Command line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access from the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
 [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
   NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
 [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
   NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
   Welcome&lt;br /&gt;
 [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel traffic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== FileZilla ====&lt;br /&gt;
For FileZilla to connect to HPC you will first need to '''configure and start''' a session to the bastion with [[#PuTTY|PuTTY]]. Make sure you have configured SSH portforwarding (Connection&amp;gt;SSH&amp;gt;Tunnels Settings)&lt;br /&gt;
*Edit &amp;gt; Settings&lt;br /&gt;
[[File:FileZilla01.png]]&lt;br /&gt;
*Connection &amp;gt; Generic Proxy&amp;lt;br&amp;gt;Type: Socks 5&amp;lt;br&amp;gt;Host: localhost&amp;lt;br&amp;gt;Port: 1080 (if you configured this in PuTTY portforwarding)&amp;lt;br&amp;gt;Exit with &amp;quot;OK&amp;quot;&lt;br /&gt;
[[File:FileZilla02.png]]&lt;br /&gt;
*File &amp;gt; Site Manager&lt;br /&gt;
[[File:FileZilla03.png]]&lt;br /&gt;
*Click &amp;quot;New Site&amp;quot;&amp;lt;br&amp;gt;Name &amp;amp; Host: linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Protocol: SFTP&amp;lt;br&amp;gt;Port: 22&amp;lt;br&amp;gt;Logon Type: Interactive (or &amp;quot;Normal&amp;quot;)&lt;br /&gt;
[[File:FileZilla04.png]]&lt;br /&gt;
*You can now &amp;quot;Connect&amp;quot;&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
There are several options for displaying graphical applications on a Windows system. A basic option is [http://www.straightrunning.com/XmingNotes/ Xming]. You can download it from: http://www.straightrunning.com/XmingNotes/ The site asks for a donation to use the latest version, but there is also a public domain version which can be used for free. Once you have installed it, you can find it in the usual place in the start menu.&amp;lt;br&amp;gt;Before you log in to an hpc cluster and run graphical applications, you need to start Xming first. It will not show much, only a small X in the system tray once it's running.&amp;lt;br&amp;gt;You also need to enable X forwarding in PuTTY for your connection to the bastion.&lt;br /&gt;
*Connection&amp;gt;SSH&amp;gt;X11&amp;lt;br&amp;gt;Check &amp;quot;Enable X11 Forwarding&amp;quot;&lt;br /&gt;
[[File:PuTTY_04.png]]&lt;br /&gt;
&lt;br /&gt;
From PuTTY on the bastion you can continue logging in to the hpc cluster, using &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to enable X-forwarding in that session.&lt;br /&gt;
&lt;br /&gt;
  ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
To check if X forwarding works, type &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that will follow the mouse pointer.&lt;br /&gt;
[[File:Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An alternative option for displaying graphical applications is Exceed, this is a commercial package for which the TU Delft has a license. It is not available by default on the standard Windows systems, but it can be installed upon request if you contact the servicedesk.&lt;br /&gt;
&lt;br /&gt;
A second alternative is [https://mobaxterm.mobatek.net/ MobaXterm], this is an all-in-one solution containing an ssh client, X server and more. You can download a free version from: https://mobaxterm.mobatek.net/download.html The free version has some limitations, but it's still perfectly usable in our environment.&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=227</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=227"/>
		<updated>2021-10-12T10:53:22Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Access from the commandline ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
   [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
     NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel traffic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== FileZilla ====&lt;br /&gt;
For FileZilla to connect to HPC you will first need to '''configure and start''' a session to the bastion with [[#PuTTY|PuTTY]]. Make sure you have configured SSH portforwarding (Connection&amp;gt;SSH&amp;gt;Tunnels Settings)&lt;br /&gt;
*Edit &amp;gt; Settings&lt;br /&gt;
[[File:FileZilla01.png]]&lt;br /&gt;
*Connection &amp;gt; Generic Proxy&amp;lt;br&amp;gt;Type: Socks 5&amp;lt;br&amp;gt;Host: localhost&amp;lt;br&amp;gt;Port: 1080 (if you configured this in PuTTY portforwarding)&amp;lt;br&amp;gt;Exit with &amp;quot;OK&amp;quot;&lt;br /&gt;
[[File:FileZilla02.png]]&lt;br /&gt;
*File &amp;gt; Site Manager&lt;br /&gt;
[[File:FileZilla03.png]]&lt;br /&gt;
*Click &amp;quot;New Site&amp;quot;&amp;lt;br&amp;gt;Name &amp;amp; Host: linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Protocol: SFTP&amp;lt;br&amp;gt;Port: 22&amp;lt;br&amp;gt;Logon Type: Interactive (or &amp;quot;Normal&amp;quot;)&lt;br /&gt;
[[File:FileZilla04.png]]&lt;br /&gt;
*You can now &amp;quot;Connect&amp;quot;&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
There are several options for displaying graphical applications on a Windows system. A basic option is [http://www.straightrunning.com/XmingNotes/ Xming]. You can download it from: http://www.straightrunning.com/XmingNotes/ The site asks for a donation to use the latest version, but there is also a public domain version which can be used for free. Once you have installed it, you can find it in the usual place in the start menu.&amp;lt;br&amp;gt;Before you log in to an hpc cluster and run graphical applications, you need to start Xming first. It will not show much, only a small X in the system tray once it's running.&amp;lt;br&amp;gt;You also need to enable X forwarding in PuTTY for your connection to the bastion.&lt;br /&gt;
*Connection&amp;gt;SSH&amp;gt;X11&amp;lt;br&amp;gt;Check &amp;quot;Enable X11 Forwarding&amp;quot;&lt;br /&gt;
[[File:PuTTY_04.png]]&lt;br /&gt;
&lt;br /&gt;
From PuTTY on the bastion you can continue logging in to the hpc cluster, using &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to enable X-forwarding in that session.&lt;br /&gt;
&lt;br /&gt;
  ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
To check if X forwarding works, type &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that will follow the mouse pointer.&lt;br /&gt;
[[File:Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An alternative option for displaying graphical applications is Exceed, this is a commercial package for which the TU Delft has a license. It is not available by default on the standard Windows systems, but it can be installed upon request if you contact the servicedesk.&lt;br /&gt;
&lt;br /&gt;
A second alternative is [https://mobaxterm.mobatek.net/ MobaXterm], this is an all-in-one solution containing an ssh client, X server and more. You can download a free version from: https://mobaxterm.mobatek.net/download.html The free version has some limitations, but it's still perfectly usable in our environment.&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=226</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=226"/>
		<updated>2021-10-12T09:17:28Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Mac OS X */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Console access ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
   [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
     NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel traffic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== FileZilla ====&lt;br /&gt;
For FileZilla to connect to HPC you will first need to '''configure and start''' a session to the bastion with [[#PuTTY|PuTTY]]. Make sure you have configured SSH portforwarding (Connection&amp;gt;SSH&amp;gt;Tunnels Settings)&lt;br /&gt;
*Edit &amp;gt; Settings&lt;br /&gt;
[[File:FileZilla01.png]]&lt;br /&gt;
*Connection &amp;gt; Generic Proxy&amp;lt;br&amp;gt;Type: Socks 5&amp;lt;br&amp;gt;Host: localhost&amp;lt;br&amp;gt;Port: 1080 (if you configured this in PuTTY portforwarding)&amp;lt;br&amp;gt;Exit with &amp;quot;OK&amp;quot;&lt;br /&gt;
[[File:FileZilla02.png]]&lt;br /&gt;
*File &amp;gt; Site Manager&lt;br /&gt;
[[File:FileZilla03.png]]&lt;br /&gt;
*Click &amp;quot;New Site&amp;quot;&amp;lt;br&amp;gt;Name &amp;amp; Host: linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Protocol: SFTP&amp;lt;br&amp;gt;Port: 22&amp;lt;br&amp;gt;Logon Type: Interactive (or &amp;quot;Normal&amp;quot;)&lt;br /&gt;
[[File:FileZilla04.png]]&lt;br /&gt;
*You can now &amp;quot;Connect&amp;quot;&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
There are several options for displaying graphical applications on a Windows system. A basic option is [http://www.straightrunning.com/XmingNotes/ Xming]. You can download it from: http://www.straightrunning.com/XmingNotes/ The site asks for a donation to use the latest version, but there is also a public domain version which can be used for free. Once you have installed it, you can find it in the usual place in the start menu.&amp;lt;br&amp;gt;Before you log in to an hpc cluster and run graphical applications, you need to start Xming first. It will not show much, only a small X in the system tray once it's running.&amp;lt;br&amp;gt;You also need to enable X forwarding in PuTTY for your connection to the bastion.&lt;br /&gt;
*Connection&amp;gt;SSH&amp;gt;X11&amp;lt;br&amp;gt;Check &amp;quot;Enable X11 Forwarding&amp;quot;&lt;br /&gt;
[[File:PuTTY_04.png]]&lt;br /&gt;
&lt;br /&gt;
From PuTTY on the bastion you can continue logging in to the hpc cluster, using &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to enable X-forwarding in that session.&lt;br /&gt;
&lt;br /&gt;
  ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
To check if X forwarding works, type &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that will follow the mouse pointer.&lt;br /&gt;
[[File:Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An alternative option for displaying graphical applications is Exceed, this is a commercial package for which the TU Delft has a license. It is not available by default on the standard Windows systems, but it can be installed upon request if you contact the servicedesk.&lt;br /&gt;
&lt;br /&gt;
A second alternative is [https://mobaxterm.mobatek.net/ MobaXterm], this is an all-in-one solution containing an ssh client, X server and more. You can download a free version from: https://mobaxterm.mobatek.net/download.html The free version has some limitations, but it's still perfectly usable in our environment.&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=225</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=225"/>
		<updated>2021-10-12T09:17:11Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Linux */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Console access ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
   [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
     NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel traffic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== FileZilla ====&lt;br /&gt;
For FileZilla to connect to HPC you will first need to '''configure and start''' a session to the bastion with [[#PuTTY|PuTTY]]. Make sure you have configured SSH portforwarding (Connection&amp;gt;SSH&amp;gt;Tunnels Settings)&lt;br /&gt;
*Edit &amp;gt; Settings&lt;br /&gt;
[[File:FileZilla01.png]]&lt;br /&gt;
*Connection &amp;gt; Generic Proxy&amp;lt;br&amp;gt;Type: Socks 5&amp;lt;br&amp;gt;Host: localhost&amp;lt;br&amp;gt;Port: 1080 (if you configured this in PuTTY portforwarding)&amp;lt;br&amp;gt;Exit with &amp;quot;OK&amp;quot;&lt;br /&gt;
[[File:FileZilla02.png]]&lt;br /&gt;
*File &amp;gt; Site Manager&lt;br /&gt;
[[File:FileZilla03.png]]&lt;br /&gt;
*Click &amp;quot;New Site&amp;quot;&amp;lt;br&amp;gt;Name &amp;amp; Host: linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Protocol: SFTP&amp;lt;br&amp;gt;Port: 22&amp;lt;br&amp;gt;Logon Type: Interactive (or &amp;quot;Normal&amp;quot;)&lt;br /&gt;
[[File:FileZilla04.png]]&lt;br /&gt;
*You can now &amp;quot;Connect&amp;quot;&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
There are several options for displaying graphical applications on a Windows system. A basic option is [http://www.straightrunning.com/XmingNotes/ Xming]. You can download it from: http://www.straightrunning.com/XmingNotes/ The site asks for a donation to use the latest version, but there is also a public domain version which can be used for free. Once you have installed it, you can find it in the usual place in the start menu.&amp;lt;br&amp;gt;Before you log in to an hpc cluster and run graphical applications, you need to start Xming first. It will not show much, only a small X in the system tray once it's running.&amp;lt;br&amp;gt;You also need to enable X forwarding in PuTTY for your connection to the bastion.&lt;br /&gt;
*Connection&amp;gt;SSH&amp;gt;X11&amp;lt;br&amp;gt;Check &amp;quot;Enable X11 Forwarding&amp;quot;&lt;br /&gt;
[[File:PuTTY_04.png]]&lt;br /&gt;
&lt;br /&gt;
From PuTTY on the bastion you can continue logging in to the hpc cluster, using &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to enable X-forwarding in that session.&lt;br /&gt;
&lt;br /&gt;
  ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
To check if X forwarding works, type &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that will follow the mouse pointer.&lt;br /&gt;
[[File:Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An alternative option for displaying graphical applications is Exceed, this is a commercial package for which the TU Delft has a license. It is not available by default on the standard Windows systems, but it can be installed upon request if you contact the servicedesk.&lt;br /&gt;
&lt;br /&gt;
A second alternative is [https://mobaxterm.mobatek.net/ MobaXterm], this is an all-in-one solution containing an ssh client, X server and more. You can download a free version from: https://mobaxterm.mobatek.net/download.html The free version has some limitations, but it's still perfectly usable in our environment.&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpc10.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpc10.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=224</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=224"/>
		<updated>2021-10-12T09:11:56Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Console access ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
   [user@home]$ ssh &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
     NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;NetID&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;NetID&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
=== PuTTY ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel traffic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [NetID@bastion]$ ssh &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     NetID@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [NetID@hpcXX]$&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    NetID@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;NetID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;NetID&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your NetID.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your NetID jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your NetID. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your NetID yourself. If your NetID would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own NetID!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own NetID you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your NetID is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your NetID is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both NetIDs have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;NetID&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== FileZilla ====&lt;br /&gt;
For FileZilla to connect to HPC you will first need to '''configure and start''' a session to the bastion with [[#PuTTY|PuTTY]]. Make sure you have configured SSH portforwarding (Connection&amp;gt;SSH&amp;gt;Tunnels Settings)&lt;br /&gt;
*Edit &amp;gt; Settings&lt;br /&gt;
[[File:FileZilla01.png]]&lt;br /&gt;
*Connection &amp;gt; Generic Proxy&amp;lt;br&amp;gt;Type: Socks 5&amp;lt;br&amp;gt;Host: localhost&amp;lt;br&amp;gt;Port: 1080 (if you configured this in PuTTY portforwarding)&amp;lt;br&amp;gt;Exit with &amp;quot;OK&amp;quot;&lt;br /&gt;
[[File:FileZilla02.png]]&lt;br /&gt;
*File &amp;gt; Site Manager&lt;br /&gt;
[[File:FileZilla03.png]]&lt;br /&gt;
*Click &amp;quot;New Site&amp;quot;&amp;lt;br&amp;gt;Name &amp;amp; Host: linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Protocol: SFTP&amp;lt;br&amp;gt;Port: 22&amp;lt;br&amp;gt;Logon Type: Interactive (or &amp;quot;Normal&amp;quot;)&lt;br /&gt;
[[File:FileZilla04.png]]&lt;br /&gt;
*You can now &amp;quot;Connect&amp;quot;&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
There are several options for displaying graphical applications on a Windows system. A basic option is [http://www.straightrunning.com/XmingNotes/ Xming]. You can download it from: http://www.straightrunning.com/XmingNotes/ The site asks for a donation to use the latest version, but there is also a public domain version which can be used for free. Once you have installed it, you can find it in the usual place in the start menu.&amp;lt;br&amp;gt;Before you log in to an hpc cluster and run graphical applications, you need to start Xming first. It will not show much, only a small X in the system tray once it's running.&amp;lt;br&amp;gt;You also need to enable X forwarding in PuTTY for your connection to the bastion.&lt;br /&gt;
*Connection&amp;gt;SSH&amp;gt;X11&amp;lt;br&amp;gt;Check &amp;quot;Enable X11 Forwarding&amp;quot;&lt;br /&gt;
[[File:PuTTY_04.png]]&lt;br /&gt;
&lt;br /&gt;
From PuTTY on the bastion you can continue logging in to the hpc cluster, using &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to enable X-forwarding in that session.&lt;br /&gt;
&lt;br /&gt;
  ssh -X &amp;lt;NetID&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
To check if X forwarding works, type &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that will follow the mouse pointer.&lt;br /&gt;
[[File:Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An alternative option for displaying graphical applications is Exceed, this is a commercial package for which the TU Delft has a license. It is not available by default on the standard Windows systems, but it can be installed upon request if you contact the servicedesk.&lt;br /&gt;
&lt;br /&gt;
A second alternative is [https://mobaxterm.mobatek.net/ MobaXterm], this is an all-in-one solution containing an ssh client, X server and more. You can download a free version from: https://mobaxterm.mobatek.net/download.html The free version has some limitations, but it's still perfectly usable in our environment.&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpc10.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpc10.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;NetID&amp;gt;@hpc10.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;NetID&amp;gt;@hpc10.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=223</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=223"/>
		<updated>2021-10-11T16:55:43Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: Koen Mulderij moved page RemoteAccess to Remote Access without leaving a redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Console access ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
   [user@home]$ ssh &amp;lt;netid&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
     netid@linux-bastion.tudelft.nl's password:&lt;br /&gt;
   [netid@bastion]$ ssh &amp;lt;netid&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     netid@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [netid@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;netid&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;netid&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;netid&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;netid&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
=== Putty ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html Putty] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel trafic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [netid@bastion]$ ssh &amp;lt;netid&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     netid@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [netid@hpcXX]$&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    netid@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;netid&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your netid.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your netid jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your netid. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your netid yourself. If your netid would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own netid!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own netid you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your netid is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your netid is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both netids have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;netid&amp;gt;@hpcXX.tudelft.net:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;netid&amp;gt;@hpcXX.tudelft.net:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;netid&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;netid&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== Filezilla ====&lt;br /&gt;
For Filezilla to connect to HPC you will first need to '''configure and start''' a session to the bastion with [[#Putty|Putty]]. Make sure you have configured SSH portforwarding (Connection&amp;gt;SSH&amp;gt;Tunnels Settings)&lt;br /&gt;
*Edit &amp;gt; Settings&lt;br /&gt;
[[File:FileZilla01.png]]&lt;br /&gt;
*Connection &amp;gt; Generic Proxy&amp;lt;br&amp;gt;Type: Socks 5&amp;lt;br&amp;gt;Host: localhost&amp;lt;br&amp;gt;Port: 1080 (if you configured this in Putty portforwarding)&amp;lt;br&amp;gt;Exit with &amp;quot;OK&amp;quot;&lt;br /&gt;
[[File:FileZilla02.png]]&lt;br /&gt;
*File &amp;gt; Site Manager&lt;br /&gt;
[[File:FileZilla03.png]]&lt;br /&gt;
*Click &amp;quot;New Site&amp;quot;&amp;lt;br&amp;gt;Name &amp;amp; Host: linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Protocol: SFTP&amp;lt;br&amp;gt;Port: 22&amp;lt;br&amp;gt;Logon Type: Interactive (or &amp;quot;Normal&amp;quot;)&lt;br /&gt;
[[File:FileZilla04.png]]&lt;br /&gt;
*You can now &amp;quot;Connect&amp;quot;&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
There are several options for displaying graphical applications on a Windows system. A basic option is [http://www.straightrunning.com/XmingNotes/ Xming]. You can download it from: http://www.straightrunning.com/XmingNotes/ The site asks for a donation to use the latest version, but there is also a public domain version which can be used for free. Once you have installed it, you can find it in the usual place in the start menu.&amp;lt;br&amp;gt;Before you log in to an hpc cluster and run graphical applications, you need to start Xming first. It will not show much, only a small X in the system tray once it's running.&amp;lt;br&amp;gt;You also need to enable X forwarding in PuTTY for your connection to the bastion.&lt;br /&gt;
*Connection&amp;gt;SSH&amp;gt;X11&amp;lt;br&amp;gt;Check &amp;quot;Enable X11 Forwarding&amp;quot;&lt;br /&gt;
[[File:PuTTY_04.png]]&lt;br /&gt;
&lt;br /&gt;
From putty on the bastion you can continue logging in to the hpc cluster, using &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to enable X-forwarding in that session.&lt;br /&gt;
&lt;br /&gt;
  ssh -X &amp;lt;netid&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
To check if X forwarding works, type &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that will follow the mouse pointer.&lt;br /&gt;
[[File:Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An alternative option for displaying graphical applications is Exceed, this is a commercial package for which the TU Delft has a license. It is not available by default on the standard Windows systems, but it can be installed upon request if you contact the servicedesk.&lt;br /&gt;
&lt;br /&gt;
A second alternative is [https://mobaxterm.mobatek.net/ MobaXterm], this is an all-in-one solution containing an ssh client, X server and more. You can download a free version from: https://mobaxterm.mobatek.net/download.html The free version has some limitations, but it's still perfectly usable in our environment.&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;netid&amp;gt;@hpc10.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;netid&amp;gt;@hpc10.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;netid&amp;gt;@hpc10.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;netid&amp;gt;@hpc10.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=222</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=222"/>
		<updated>2021-10-11T16:48:06Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Console access ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
   [user@home]$ ssh &amp;lt;netid&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
     netid@linux-bastion.tudelft.nl's password:&lt;br /&gt;
   [netid@bastion]$ ssh &amp;lt;netid&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     netid@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [netid@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;netid&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;netid&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;netid&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;netid&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
=== Putty ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html Putty] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel trafic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [netid@bastion]$ ssh &amp;lt;netid&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     netid@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [netid@hpcXX]$&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    netid@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;netid&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your netid.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your netid jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your netid. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your netid yourself. If your netid would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own netid!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own netid you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your netid is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your netid is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both netids have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;netid&amp;gt;@hpcXX.tudelft.net:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;netid&amp;gt;@hpcXX.tudelft.net:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;netid&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;netid&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== Filezilla ====&lt;br /&gt;
For Filezilla to connect to HPC you will first need to '''configure and start''' a session to the bastion with [[#Putty|Putty]]. Make sure you have configured SSH portforwarding (Connection&amp;gt;SSH&amp;gt;Tunnels Settings)&lt;br /&gt;
*Edit &amp;gt; Settings&lt;br /&gt;
[[File:FileZilla01.png]]&lt;br /&gt;
*Connection &amp;gt; Generic Proxy&amp;lt;br&amp;gt;Type: Socks 5&amp;lt;br&amp;gt;Host: localhost&amp;lt;br&amp;gt;Port: 1080 (if you configured this in Putty portforwarding)&amp;lt;br&amp;gt;Exit with &amp;quot;OK&amp;quot;&lt;br /&gt;
[[File:FileZilla02.png]]&lt;br /&gt;
*File &amp;gt; Site Manager&lt;br /&gt;
[[File:FileZilla03.png]]&lt;br /&gt;
*Click &amp;quot;New Site&amp;quot;&amp;lt;br&amp;gt;Name &amp;amp; Host: linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Protocol: SFTP&amp;lt;br&amp;gt;Port: 22&amp;lt;br&amp;gt;Logon Type: Interactive (or &amp;quot;Normal&amp;quot;)&lt;br /&gt;
[[File:FileZilla04.png]]&lt;br /&gt;
*You can now &amp;quot;Connect&amp;quot;&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
== How to display graphical applications ==&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
There are several options for displaying graphical applications on a Windows system. A basic option is [http://www.straightrunning.com/XmingNotes/ Xming]. You can download it from: http://www.straightrunning.com/XmingNotes/ The site asks for a donation to use the latest version, but there is also a public domain version which can be used for free. Once you have installed it, you can find it in the usual place in the start menu.&amp;lt;br&amp;gt;Before you log in to an hpc cluster and run graphical applications, you need to start Xming first. It will not show much, only a small X in the system tray once it's running.&amp;lt;br&amp;gt;You also need to enable X forwarding in PuTTY for your connection to the bastion.&lt;br /&gt;
*Connection&amp;gt;SSH&amp;gt;X11&amp;lt;br&amp;gt;Check &amp;quot;Enable X11 Forwarding&amp;quot;&lt;br /&gt;
[[File:PuTTY_04.png]]&lt;br /&gt;
&lt;br /&gt;
From putty on the bastion you can continue logging in to the hpc cluster, using &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to enable X-forwarding in that session.&lt;br /&gt;
&lt;br /&gt;
  ssh -X &amp;lt;netid&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
&lt;br /&gt;
To check if X forwarding works, type &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that will follow the mouse pointer.&lt;br /&gt;
[[File:Xeyes.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An alternative option for displaying graphical applications is Exceed, this is a commercial package for which the TU Delft has a license. It is not available by default on the standard Windows systems, but it can be installed upon request if you contact the servicedesk.&lt;br /&gt;
&lt;br /&gt;
A second alternative is [https://mobaxterm.mobatek.net/ MobaXterm], this is an all-in-one solution containing an ssh client, X server and more. You can download a free version from: https://mobaxterm.mobatek.net/download.html The free version has some limitations, but it's still perfectly usable in our environment.&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
For displaying graphical applications on a Mac OS X system you need a software package called [https://www.xquartz.org/ XQuartz] which can be downloaded from: [https://www.xquartz.org/ https://www.xquartz.org/] This will run on Mac OS X v10.6 and higher. Once it's installed, you end up with an application called XQuartz located in /Applications/Utilties. There is no need to start it first before you log in to an hpc cluster, it will start automatically as soon as it is needed. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;netid&amp;gt;@hpc10.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;netid&amp;gt;@hpc10.tudelft.net&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Most Linux workstations come with a graphical environment. This works transparantly with the graphical applications on the hpc clusters. The only thing you need to do is add the option &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; command that you use to log in:&lt;br /&gt;
&lt;br /&gt;
 ssh -X &amp;lt;netid&amp;gt;@hpc10.tudelft.net&lt;br /&gt;
&lt;br /&gt;
You can test if this works by typing &amp;lt;code&amp;gt;xeyes&amp;lt;/code&amp;gt; on the command line, this will show a small window on your screen with two eyes that follow the mouse pointer. If it doesn't work, try the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y &amp;lt;netid&amp;gt;@hpc10.tudelft.net&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=221</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=221"/>
		<updated>2021-10-11T16:15:30Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* WinSCP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Console access ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
   [user@home]$ ssh &amp;lt;netid&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
     netid@linux-bastion.tudelft.nl's password:&lt;br /&gt;
   [netid@bastion]$ ssh &amp;lt;netid&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     netid@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [netid@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;netid&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;netid&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;netid&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;netid&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
=== Putty ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html Putty] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel trafic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [netid@bastion]$ ssh &amp;lt;netid&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     netid@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [netid@hpcXX]$&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    netid@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;netid&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your netid.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your netid jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your netid. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your netid yourself. If your netid would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own netid!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own netid you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your netid is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your netid is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both netids have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;netid&amp;gt;@hpcXX.tudelft.net:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;netid&amp;gt;@hpcXX.tudelft.net:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;netid&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;netid&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== Filezilla ====&lt;br /&gt;
For Filezilla to connect to HPC you will first need to '''configure and start''' a session to the bastion with [[#Putty|Putty]]. Make sure you have configured SSH portforwarding (Connection&amp;gt;SSH&amp;gt;Tunnels Settings)&lt;br /&gt;
*Edit &amp;gt; Settings&lt;br /&gt;
[[File:FileZilla01.png]]&lt;br /&gt;
*Connection &amp;gt; Generic Proxy&amp;lt;br&amp;gt;Type: Socks 5&amp;lt;br&amp;gt;Host: localhost&amp;lt;br&amp;gt;Port: 1080 (if you configured this in Putty portforwarding)&amp;lt;br&amp;gt;Exit with &amp;quot;OK&amp;quot;&lt;br /&gt;
[[File:FileZilla02.png]]&lt;br /&gt;
*File &amp;gt; Site Manager&lt;br /&gt;
[[File:FileZilla03.png]]&lt;br /&gt;
*Click &amp;quot;New Site&amp;quot;&amp;lt;br&amp;gt;Name &amp;amp; Host: linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Protocol: SFTP&amp;lt;br&amp;gt;Port: 22&amp;lt;br&amp;gt;Logon Type: Interactive (or &amp;quot;Normal&amp;quot;)&lt;br /&gt;
[[File:FileZilla04.png]]&lt;br /&gt;
*You can now &amp;quot;Connect&amp;quot;&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=220</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=220"/>
		<updated>2021-10-11T16:14:53Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* Filezilla */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Console access ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
   [user@home]$ ssh &amp;lt;netid&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
     netid@linux-bastion.tudelft.nl's password:&lt;br /&gt;
   [netid@bastion]$ ssh &amp;lt;netid&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     netid@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [netid@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;netid&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;netid&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;netid&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;netid&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
=== Putty ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html Putty] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel trafic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [netid@bastion]$ ssh &amp;lt;netid&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     netid@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [netid@hpcXX]$&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    netid@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;netid&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your netid.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your netid jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your netid. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your netid yourself. If your netid would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own netid!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own netid you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your netid is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your netid is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both netids have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;netid&amp;gt;@hpcXX.tudelft.net:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;netid&amp;gt;@hpcXX.tudelft.net:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;netid&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;netid&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== Filezilla ====&lt;br /&gt;
For Filezilla to connect to HPC you will first need to '''configure and start''' a session to the bastion with [[#Putty|Putty]]. Make sure you have configured SSH portforwarding (Connection&amp;gt;SSH&amp;gt;Tunnels Settings)&lt;br /&gt;
*Edit &amp;gt; Settings&lt;br /&gt;
[[File:FileZilla01.png]]&lt;br /&gt;
*Connection &amp;gt; Generic Proxy&amp;lt;br&amp;gt;Type: Socks 5&amp;lt;br&amp;gt;Host: localhost&amp;lt;br&amp;gt;Port: 1080 (if you configured this in Putty portforwarding)&amp;lt;br&amp;gt;Exit with &amp;quot;OK&amp;quot;&lt;br /&gt;
[[File:FileZilla02.png]]&lt;br /&gt;
*File &amp;gt; Site Manager&lt;br /&gt;
[[File:FileZilla03.png]]&lt;br /&gt;
*Click &amp;quot;New Site&amp;quot;&amp;lt;br&amp;gt;Name &amp;amp; Host: linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Protocol: SFTP&amp;lt;br&amp;gt;Port: 22&amp;lt;br&amp;gt;Logon Type: Interactive (or &amp;quot;Normal&amp;quot;)&lt;br /&gt;
[[File:FileZilla04.png]]&lt;br /&gt;
*You can now &amp;quot;Connect&amp;quot;&amp;lt;br&amp;gt;You may be presented with a question about accepting the server's host key (this is normal the first time)&lt;br /&gt;
&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:FileZilla04.png&amp;diff=219</id>
		<title>File:FileZilla04.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:FileZilla04.png&amp;diff=219"/>
		<updated>2021-10-11T16:06:19Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: Koen Mulderij uploaded a new version of &amp;amp;quot;File:FileZilla04.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:FileZilla04.png&amp;diff=218</id>
		<title>File:FileZilla04.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:FileZilla04.png&amp;diff=218"/>
		<updated>2021-10-11T15:54:58Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:FileZilla03.png&amp;diff=217</id>
		<title>File:FileZilla03.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:FileZilla03.png&amp;diff=217"/>
		<updated>2021-10-11T15:54:49Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:FileZilla02.png&amp;diff=216</id>
		<title>File:FileZilla02.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:FileZilla02.png&amp;diff=216"/>
		<updated>2021-10-11T15:54:40Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:FileZilla01.png&amp;diff=215</id>
		<title>File:FileZilla01.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:FileZilla01.png&amp;diff=215"/>
		<updated>2021-10-11T15:54:22Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=214</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=214"/>
		<updated>2021-10-11T15:04:26Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* WinSCP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Console access ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
   [user@home]$ ssh &amp;lt;netid&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
     netid@linux-bastion.tudelft.nl's password:&lt;br /&gt;
   [netid@bastion]$ ssh &amp;lt;netid&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     netid@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [netid@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;netid&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;netid&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;netid&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;netid&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
=== Putty ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html Putty] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel trafic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [netid@bastion]$ ssh &amp;lt;netid&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     netid@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [netid@hpcXX]$&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    netid@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;netid&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your netid.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your netid jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your netid. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your netid yourself. If your netid would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own netid!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own netid you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your netid is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your netid is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both netids have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;netid&amp;gt;@hpcXX.tudelft.net:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;netid&amp;gt;@hpcXX.tudelft.net:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;netid&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;netid&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== Filezilla ====&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
WinSCP is a simple tool that has the internal option to create a tunnel through  the bastion server. It can be downloaded from [https://winscp.net/eng/download.php https://winscp.net/eng/download.php]&lt;br /&gt;
*Session &amp;gt; New Session&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
*Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;Advanced&amp;quot; button&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Connection &amp;gt; Tunnel&amp;lt;br&amp;gt;Select &amp;quot;Connect through SSH tunnel&amp;quot;&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students)&amp;lt;br&amp;gt;Fill in your NetID&amp;lt;br&amp;gt;Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
*Click &amp;quot;Save&amp;quot;&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
*Save session as site&amp;lt;br&amp;gt;You can accept the suggested name&lt;br /&gt;
[[File:WinSCP04.png]]&lt;br /&gt;
*You can now &amp;quot;Login&amp;quot;&amp;lt;br&amp;gt;You will be asked to supply your password twice: first for the bastion, second for the HPC&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=213</id>
		<title>Remote Access</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=Remote_Access&amp;diff=213"/>
		<updated>2021-10-11T12:26:16Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: /* WinSCP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access to the HPC-clusters is limited from outside the TU Delft network for security reasons.&amp;lt;br&amp;gt;&lt;br /&gt;
When you use a [https://www.tudelft.nl/ict-handleidingen/vpn VPN-connection] direct access from your desktop/laptop to the HPC is possible. You can use your application of choice for this connection.&amp;lt;br&amp;gt;&lt;br /&gt;
When you don't use a VPN you should connect through a [[#Bastion|Bastion server]], which is described below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bastion ==&lt;br /&gt;
The TU Delft offers two bastion servers. These servers can be used to tunnel your traffic to the HPC.&lt;br /&gt;
*linux-bastion.tudelft.nl for employees or guests.&lt;br /&gt;
*student-linux.tudelft.nl for students.&lt;br /&gt;
&lt;br /&gt;
== Console access ==&lt;br /&gt;
The explanations below are the simplest way to connect to a console on an HPC. [[#Advanced configs|Advanced configs]] describes more complex configurations which save time when regularly using the connection.&lt;br /&gt;
=== Command line ===&lt;br /&gt;
When your desktop/laptop supports ssh from the console, you can connect to the bastion server and from there you can connect to the HPC:&lt;br /&gt;
   [user@home]$ ssh &amp;lt;netid&amp;gt;@linux-bastion.tudelft.nl&lt;br /&gt;
     netid@linux-bastion.tudelft.nl's password:&lt;br /&gt;
   [netid@bastion]$ ssh &amp;lt;netid&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     netid@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [netid@hpcXX]$&lt;br /&gt;
*Replace &amp;lt;netid&amp;gt; with your NetID (also remove the &amp;lt;&amp;gt;)&lt;br /&gt;
*When your a student replace &amp;lt;netid&amp;gt;@linux-bastion.tudelft.nl with &amp;lt;netid&amp;gt;@student-linux.tudelft.nl&lt;br /&gt;
*Replace &amp;lt;netid&amp;gt;@hpcXX.tudelft.net with the HPC you are connecting to.&lt;br /&gt;
=== Putty ===&lt;br /&gt;
When your desktop/laptop doesn't support ssh from the console, you can use [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html Putty] (it may already be installed).&amp;lt;br&amp;gt;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;Fill in the name of the TU Delft SSH server linux-bastion.tudelft.nl (student-linux.tudelft.nl for students), and select the SSH protocol (port 22):&amp;lt;br&amp;gt;[[File:PuTTY-Hostname.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH Settings&amp;lt;br&amp;gt;Select Share SSH connections if possible (this means that you will not have to authenticate when you start a second session):&amp;lt;br&amp;gt;[[File:PuTTY-ShareConnection.png]]&lt;br /&gt;
*OPTIONAL: Connection&amp;gt;SSH&amp;gt;Tunnels Settings (This allows other applications to tunnel trafic through the bastion host)&amp;lt;br&amp;gt;[[File:PuTTY-Tunnels.png]]&lt;br /&gt;
**Source Port: 1080&lt;br /&gt;
**Dynamic &amp;amp; Auto&lt;br /&gt;
**Press &amp;quot;Add&amp;quot;&lt;br /&gt;
*Session Settings&amp;lt;br&amp;gt;To store these session settings, go back to the session tab, and save the settings under a session name. To activate a stored session, double-click on the session name:&amp;lt;br&amp;gt;[[File:PuTTY-SaveSession.png]]&lt;br /&gt;
Once you're connected to the bastion server you can use the locally available ssh to connect to a HPC:&lt;br /&gt;
   [netid@bastion]$ ssh &amp;lt;netid&amp;gt;@hpcXX.tudelft.net&lt;br /&gt;
     netid@hpcXX.tudelft.net's password: &lt;br /&gt;
     Welcome&lt;br /&gt;
   [netid@hpcXX]$&lt;br /&gt;
=== Advanced configs ===&lt;br /&gt;
==== Making OpenSSH more user-friendly ====&lt;br /&gt;
The OpenSSH clients can be configured using a configuration file in ~/.ssh/config (Linux, macOS) or ~\.ssh\config (Windows).&lt;br /&gt;
&lt;br /&gt;
===== Define connections =====&lt;br /&gt;
For the OpenSSH clients you can predefine often used connections by placing a section like the following in the configuration file on your local computer. Authentication on the bastion with keys is not possible, so password is used.&amp;lt;br&amp;gt;&lt;br /&gt;
Employees:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
Students:&lt;br /&gt;
  Host bastion&lt;br /&gt;
  Hostname linux-bastion.tudelft.nl&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
  PreferredAuthentications password&lt;br /&gt;
&lt;br /&gt;
You can then connect simply by ssh bastion. For example:&lt;br /&gt;
  [user@home]$ ssh bastion&lt;br /&gt;
    netid@linux-bastion.tudelft.nl's password:&lt;br /&gt;
&lt;br /&gt;
===== SSH Proxy Support =====&lt;br /&gt;
Since this configuration depends on [[#Define connections|Define connections]] configure that first.&amp;lt;br&amp;gt;&lt;br /&gt;
To connect directly from your machine to an HPC cluster login node (without connecting to the bastion server first), create a connection via a proxy by adding the following lines to the configuration file ~/.ssh/config on your local computer:&lt;br /&gt;
&lt;br /&gt;
  Host hpcXX&lt;br /&gt;
  Hostname hpcXX.tudelft.net&lt;br /&gt;
  ProxyCommand ssh -W %h:%p bastion&lt;br /&gt;
  User &amp;lt;netid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then simply use ssh hpcXX (or scp -p '&amp;lt;local file&amp;gt;' &amp;quot;hpcXX:/scratch/&amp;lt;netid&amp;gt;/&amp;quot;) from your local computer.&lt;br /&gt;
&lt;br /&gt;
===== Session multiplexing =====&lt;br /&gt;
OpenSSH clients support multiple sessions over a single connection. This means you have to enter your password only once, to make the connection, and can then open multiple sessions (SSH, SCP and SFTP) to that computer over the same connection. This is especially convenient when connecting to the bastion server, where you have to type your password always.&lt;br /&gt;
&lt;br /&gt;
Note: SSH public key logins won't work (reliably, (because Kerberos authentication is required to access your home directory).&lt;br /&gt;
&lt;br /&gt;
Add the following section to the end of the configuration file on your local computer and on the bastion server:&lt;br /&gt;
&lt;br /&gt;
  Host *&lt;br /&gt;
  ControlMaster auto&lt;br /&gt;
  ControlPath /tmp/ssh-%r@%h:%p&lt;br /&gt;
&lt;br /&gt;
Windows users may need to adapt the ControlPath location to match Windows.&lt;br /&gt;
&lt;br /&gt;
You can use the exact same commands as above.&lt;br /&gt;
&lt;br /&gt;
== File Transfer ==&lt;br /&gt;
The best method for transfering files depends on where you want to store your files:&lt;br /&gt;
#Files in your home directory on HPC are only available within HPC&lt;br /&gt;
#Files on Network Shares are available on other locations (such as a TU Delft workplace, weblogin.tudelft.nl or other HPC clusters)&amp;lt;br&amp;gt;Copying files to these shares is best done using the manuals on [https://webdata.tudelft.nl/ webdata.tudelft.nl]&lt;br /&gt;
&lt;br /&gt;
When you want to copy files to the HPC you can copy them from Network Shares&lt;br /&gt;
=== (Windows) Network Shares ===&lt;br /&gt;
&lt;br /&gt;
==== Authenticate ====&lt;br /&gt;
It is possible to access the group and bulk shares of your research group. It is required that you have logged in using your password. If you logged in with an ssh public/private keypair instead of your password, you need to authenticate first with:&lt;br /&gt;
 kinit&lt;br /&gt;
This will ask you to type your password. This authentication is valid for about eight hours, after that you have to authenticate again. &lt;br /&gt;
&lt;br /&gt;
==== Basic access ====&lt;br /&gt;
&lt;br /&gt;
Now just type (depending on which share you want to use):&lt;br /&gt;
 cd /tudelft/$USER/staff-group/&lt;br /&gt;
 cd /tudelft/$USER/student-group/&lt;br /&gt;
 cd /tudelft/$USER/staff-bulk/&lt;br /&gt;
 cd /tudelft/$USER/staff-umbrella/&lt;br /&gt;
&lt;br /&gt;
and navigate from there to the directories that you need.&lt;br /&gt;
You can access your Windows home directory as well. The subdirectories of the home directories are followed by '''the first letter of your surname''' and then your netid.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if your name would be John Smith and your netid jsmith;&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/$USER/staff-homes/s/jsmith&lt;br /&gt;
 cd /tudelft/$USER/student-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
==== Important note ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; part in the commands above is a shell variable that contains your netid. You can also substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; for your netid yourself. If your netid would be &amp;lt;code&amp;gt;jsmith&amp;lt;/code&amp;gt;, the command&lt;br /&gt;
&lt;br /&gt;
 cd /tudelft/jsmith/staff-homes/s/jsmith&lt;br /&gt;
&lt;br /&gt;
would work just as well. Please do not substitute &amp;lt;code&amp;gt;$USER&amp;lt;/code&amp;gt; with anything else than your own netid!&amp;lt;br&amp;gt;&lt;br /&gt;
'''If you use anthing other than your own netid you'll create a recipe for potential disaster!'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you and a coworker need to access te same data on a group or bulk volume at the same time, you both use different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
So &amp;lt;code&amp;gt;/tudelft/jsmith/staff-group/&amp;lt;/code&amp;gt; only works if your netid is jsmith and &amp;lt;code&amp;gt;/tudelft/pbrown/staff-group/&amp;lt;/code&amp;gt; only works works if your netid is pbrown.&amp;lt;br&amp;gt;&lt;br /&gt;
If both netids have the same privileges for accessing the group volumes, then these commands give access to the same data.&lt;br /&gt;
&lt;br /&gt;
=== Data on HPC ===&lt;br /&gt;
If you want to transfer data directly to the HPC you will need some extra configuration&lt;br /&gt;
==== Command line ====&lt;br /&gt;
Please first configure [[#SSH Proxy Support|SSH Proxy Support]].&amp;lt;br&amp;gt;&lt;br /&gt;
To transfer files you can use scp, which is very similar to ssh&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your remote home directory on HPC to the local home directory on your desktop or laptop. &lt;br /&gt;
 scp &amp;lt;netid&amp;gt;@hpcXX.tudelft.net:~/projects.txt ~&lt;br /&gt;
&lt;br /&gt;
*Copy an entire directory with all its content, use the '-r' option&amp;lt;br&amp;gt;This will copy the directory 'projects' from your remote home directory on HPC to the local home directory on your desktop or laptop:&lt;br /&gt;
 scp -r &amp;lt;netid&amp;gt;@hpcXX.tudelft.net:~/projects/ ~&lt;br /&gt;
&lt;br /&gt;
*Copy the file 'projects.txt' from your local home directory on your desktop or laptop to your remote home directory on HPC. &lt;br /&gt;
 scp projects.txt &amp;lt;netid&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
*Copy the directory 'projects' and all its content from your current working directory on your desktop or laptop to your remote home directory on HPC.&lt;br /&gt;
 scp -r projects/ &amp;lt;netid&amp;gt;@hpcXX:~/&lt;br /&gt;
&lt;br /&gt;
==== Filezilla ====&lt;br /&gt;
==== WinSCP ====&lt;br /&gt;
[[File:WinSCP01.png]]&lt;br /&gt;
[[File:WinSCP02.png]]&lt;br /&gt;
[[File:WinSCP03.png]]&lt;br /&gt;
[[File:WinSCP04.png]]&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:WinSCP04.png&amp;diff=212</id>
		<title>File:WinSCP04.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:WinSCP04.png&amp;diff=212"/>
		<updated>2021-10-11T10:25:36Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:WinSCP03.png&amp;diff=211</id>
		<title>File:WinSCP03.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:WinSCP03.png&amp;diff=211"/>
		<updated>2021-10-11T10:25:19Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:WinSCP02.png&amp;diff=210</id>
		<title>File:WinSCP02.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:WinSCP02.png&amp;diff=210"/>
		<updated>2021-10-11T10:25:03Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
	<entry>
		<id>https://hpcwiki.tudelft.nl/index.php?title=File:WinSCP01.png&amp;diff=209</id>
		<title>File:WinSCP01.png</title>
		<link rel="alternate" type="text/html" href="https://hpcwiki.tudelft.nl/index.php?title=File:WinSCP01.png&amp;diff=209"/>
		<updated>2021-10-11T10:21:32Z</updated>

		<summary type="html">&lt;p&gt;Koen Mulderij: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Koen Mulderij</name></author>
	</entry>
</feed>