SSH and SCP: Difference between revisions
m (Clarity) |
m (→SCP: no staff) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 5: | Line 5: | ||
=== Inside the university === | === Inside the university === | ||
To connect to Asterope or Merope simply use, where <code>< | To connect to Asterope or Merope simply use, where <code><username></code> has the format <code>xyz123a</code>, the command: | ||
<code>ssh < | <code>ssh <username>@asterope.agk.uni-due.de</code> | ||
=== From outside of the university === | === From outside of the university === | ||
| Line 16: | Line 16: | ||
<code>sudo forcepoint-client vpn.uni-due.de --resolver /usr/bin/resolvectl</code> | <code>sudo forcepoint-client vpn.uni-due.de --resolver /usr/bin/resolvectl</code> | ||
The university does not allow direct login to the group servers, yet. | |||
== SCP == | == SCP == | ||
| Line 37: | Line 23: | ||
<code>scp -pr <username>@asterope.agk.uni-due.de:asterope-home/some/folder/somewhere/somedata.data</code> | <code>scp -pr <username>@asterope.agk.uni-due.de:asterope-home/some/folder/somewhere/somedata.data</code> | ||
The <code>-r</code> is needed to copy folders and not just single files, the <code>-P</code> to specify a port to which to connect to. Note that for <code>scp</code>, in contrast to <code>ssh</code>, this <code>p</code> is uppercase. The direct forwarding from above works here as well, just replace the <code>-p</code> flag by <code>-P</code>. | The <code>-r</code> is needed to copy folders and not just single files, the <code>-P</code> to specify a port to which to connect to. Note that for <code>scp</code>, in contrast to <code>ssh</code>, this <code>p</code> is uppercase. The direct forwarding from above works here as well, just replace the <code>-p</code> flag by <code>-P</code>. | ||
Latest revision as of 16:28, 24 January 2024
We need the SSH and SCP commands to access the different clusters of the group. As soon as your user ID is working, Lothar can give you access to the two servers Asterope and Merope.
SSH
Inside the university
To connect to Asterope or Merope simply use, where <username> has the format xyz123a, the command:
ssh <username>@asterope.agk.uni-due.de
From outside of the university
To access the university network from outside, we need to establish a VPN connection using Forcepoint. The command needed to connect is:
sudo forcepoint-client vpn.uni-due.de --resolver /usr/bin/resolvectl
The university does not allow direct login to the group servers, yet.
SCP
SCP from inside the university network is very straightforward. The needed command is
scp -pr <username>@asterope.agk.uni-due.de:asterope-home/some/folder/somewhere/somedata.data
The -r is needed to copy folders and not just single files, the -P to specify a port to which to connect to. Note that for scp, in contrast to ssh, this p is uppercase. The direct forwarding from above works here as well, just replace the -p flag by -P.
It is good practice to use the (lowercase) -p flag (note how flags can be written together: -pr4 or -p -r -4 would also work) to preserve the timestamp on the file(s); otherwise, the timestamp is set to the time of copy, which is "not true" and possibly confusing (the file was not modified, just transfered).
A more powerful command that is resilient to network interruptions, has optimisations that are important especially for large files, etc. is rsync.