Moving data to remote servers
This section describes how to transfer data to and from a TU Delft virtual server. The procedure is different depending on whether the server runs a Windows or Linux-based operating system. Although there are many ways to transfer data from one machine to another, TU Delft servers only support a few of them.
Linux servers
The scp
command is a secure file transfer utility that allows you to copy files between Linux-based hosts (this includes macOS) on a network. It uses SSH for data transfer, providing the same authentication and security as SSH. Common scenarios in which you might need to transfer data between hosts include uploading scripts, downloading results, or transferring configuration files.
Prerequisites
Before starting, you need:
- SCP (Secure Copy Protocol) installed on your local machine. SCP is a command-line utility that allows you to securely transfer files between hosts on a network.
- SSH access to the remote host (e.g., VPS) you want to connect to.
Moving data via SCP
To copy data to and from a remote host using the scp
command, you can use the following syntax:
# Copy TO Remote Host
scp <path-my-local-file> <target-username>@<remote-host>:<full-path/remote-directory>/
# Copy FROM Remote Host
scp <target-username>@<remote-host>:<full-path/my-remote-file> <path-my-local-directory>/
Transferring files using ProxyJump
In the case of a VPS hosted by TU Delft, you need to copy data to a remote host via a bastion host (an intermediary server). Therefore, you must use the -o
option of scp
to specify a ProxyJump
that will connect to the bastion host first. Alternatively, you can choose to transfer files using SSH tunneling.
Transfer to remote host
# If using default SSH key name, for example, id_ed25519 or id_rsa
scp -o "ProxyJump <bastion-username>@linux-bastion-ex.tudelft.nl" <path-my-local-file> \
<target-username>@<remote-host>:<full-path/remote-directory>/
# If using a custom SSH key name, for example, my_custom_key
scp -i <path-to-custom-private-ssh-key> -o "ProxyJump <bastion-username>@linux-bastion-ex.tudelft.nl" \
<path-my-local-file> <target-username>@<remote-host>:<full-path-remote-directory>/
Transfer from remote host
# If using default SSH key name, for example, id_ed25519 or id_rsa
scp -o "ProxyJump <bastion-username>@linux-bastion-ex.tudelft.nl" \
<target-username>@<remote-host>:<full-path-remote-file>/ <path-my-local-directory>/
# If using a custom SSH key name, for example, my_custom_key
scp -i <path-to-custom-private-ssh-key> -o "ProxyJump <bastion-username>@linux-bastion-ex.tudelft.nl" \
<target-username>@<remote-host>:<full-path-remote-file>/ <path-my-local-directory>/
Transferring files using SSH tunneling
If SSH tunneling has been configured correctly for the remote host, you can copy files to and from a remote host as follows:
# Copy TO remote host
$ <path-my-local-file> <host-nickname>:<full-path-remote-directory>/
# Copy FROM remote host
$ scp <host-nickname>:<full-path-remote-file>/ <path-my-local-directory>/
Windows servers
Transferring data to and from a TU Delft Windows server is done via the Citrix platform, using the app’s built-in menu shown in the image below.
Transferring files
- Open a web browser and log into your Windows server as usual via the Citrix portal.
- Open the Citrix menu located at the center-top of the server window and click on the Upload or Download button, as shown in the image above.
- A pop-up window will open on where you can select the files you wish to transfer to the server.
It is not possible to directly transfer files to or from the server’s C: or D: drives. Instead, you upload or download files to your personal TU Delft drive which is connected to the server. Using the Windows File Explorer and standard copy/paste or drag-and-drop operations, you can transfer the data from your personal drive to the server’s C: or D: drives.
Using the clipboard
TU Delft Windows servers do not allow to directly copy or paste text from the clipboard. Instead, you must use Citrix’s clipboard functionality. To do so, open the Citrix’s menu located at the center-top of the window and click on the Clipboard button. A pop-up window will open on which you can copy or paste the text you wish to transfer. Note that it is only possible to transfer text via the clipboard; images or files are not supported.