Copying Files to and from a Bastion VM
Pulling a file from a Bastion server
To pull one or more files from a Bastion server to your workstation or server, you can use the following command:
scp -P 2222 -o User=<local user>:<remote server> qcbas-qcint.quintessence.de:'<remote file path>' <local file path>
Example: to copy a file from the mga3dev server to the qcgaia-qcint server, you can use the following command on the qcgaia-qcint server:
scp -P 2222 -o User=qcgaia-qcint:mga3dev qcbas-qcint.quintessence.de:'/home/qcuser/path/to/remote/file' /home/qcuser/pat/to/local/file
scp -P 2222 -o User=wgielen:qcgaia-qcint qcbas-qcint.quintessence.de:'/home/qcuser/path/to/remote/file' /home/qcuser/pat/to/local/file
Pulling a file from a non-Bastion server
To pull one or more files from a non-Bastion server (such as an environment in the HAJ office), you can use the following command:
scp <remote user>@<remote ip>:<remote file path> <local file path>
Example: to copy a file from the lha3dev server to the qcgaia-qcint server, you can use the following command on the qcgaia-qcint server:
scp qcuser@10.10.123.50:/home/qcuser/path/to/remote/file /home/qcuser/pat/to/local/file
If your public key is not available on the remote server, you can copy it using following command (assuming we are using qcuser):
ssh-copy-id -i ~/.ssh/id_rsa.pub qcuser@<remote ip>
Pushing a file to a Bastion server
To push a file to a Bastion server, you can use the following command:
scp -P 2222 -o User=<local user>:<remote server> <local file path> qcbas-qcint.quintessence.de:<remote file path>
scp -P 2222 -o User=wgielen:qcgaia-qcint /home/qcuser/pat/to/local/file qcbas-qcint.quintessence.de:/home/qcuser/path/to/remote/file
Pushing a file to a non-Bastion server
To push one or more files to a non-Bastion server (such as an environment in the HAJ office), you can use the following command:
scp <local file path> <remote user>@<remote server>:<remote file path>
Example: to copy a file from your workstation to the mglhdev server, you can use the following command on the your workstation:
scp /home/qcuser/pat/to/local/file qcuser@10.10.123.50:/home/qcuser/path/to/remote/file
Changelog
| Date | Author | Message |
|---|---|---|
| 2026-02-25 | aresnikowa | Merge remote-tracking branch 'origin/master' |