system:beginners:remoteaccess
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
system:beginners:remoteaccess [2024/08/21 15:53] – blinke | system:beginners:remoteaccess [2025/04/16 08:13] (current) – Remove old lummerland stuff sbeyvers | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== USING Remote Access ===== | + | ´===== USING Remote Access ===== |
Access to BCF systems is available via different methods. Please select the best method depending on your requirement. | Access to BCF systems is available via different methods. Please select the best method depending on your requirement. | ||
Line 11: | Line 11: | ||
SSH (" | SSH (" | ||
- | === Jump host === | + | === Requirements for ssh access |
- | BCF access is available via the central jump host | + | You need to meet the following requirements for ssh access: |
- | **login.computational.bio.uni-giessen.de** | + | * a valid and active BCF account |
+ | * a registered SSH public key | ||
+ | * a running SSH agent on the client | ||
+ | |||
+ | |||
+ | === Jump host === | ||
+ | |||
+ | BCF access is available via the central jump host **login.computational.bio.uni-giessen.de** | ||
As jump host this system allows connections from the internet, but is not configured to execute applications. It's sole purpose is relaying connections to internal hosts. Access to files (home directories, | As jump host this system allows connections from the internet, but is not configured to execute applications. It's sole purpose is relaying connections to internal hosts. Access to files (home directories, | ||
Line 22: | Line 29: | ||
The main target for connections via the jump host is the internal host for interactive work, **cli.intra**. This is a dedicated machine for executing simple application, | The main target for connections via the jump host is the internal host for interactive work, **cli.intra**. This is a dedicated machine for executing simple application, | ||
- | Since this host is shared among all users, resource limits have been configuration per user. Each user lmited | + | Since this host is shared among all users, resource limits have been configuration per user. Each user limited |
+ | |||
+ | === Network architecture for accessing resources in the bcf system === | ||
+ | |||
+ | The diagram explains how to access systems in the intranet from outside the intranet and how to access systems outside the intranet from inside the intranet. The following sections describe how to configure your system for each of the usage scenarios. | ||
+ | |||
+ | {{ : | ||
=== SSH agent === | === SSH agent === | ||
Line 40: | Line 53: | ||
< | < | ||
- | Host cli | + | Host login login.computational.bio.uni-giessen.de |
+ | HostName login.computational.bio.uni-giessen.de | ||
+ | User < | ||
+ | ForwardAgent yes | ||
+ | |||
+ | Host cli cli.intra | ||
HostName cli.intra | HostName cli.intra | ||
- | | + | |
ForwardAgent yes | ForwardAgent yes | ||
+ | ProxyJump login | ||
+ | |||
</ | </ | ||
The '' | The '' | ||
'' | '' | ||
- | '' | + | '' |
Line 79: | Line 99: | ||
Depending on the configuration of your SSH client it may automatically accept host keys. The exact format of the fingerprint depends on the key algorithm used. In the example above the **ED25519** algorithm is used, other variants are **ECDSA** or **RSA**. Newer SSH clients will try to use ED25519. | Depending on the configuration of your SSH client it may automatically accept host keys. The exact format of the fingerprint depends on the key algorithm used. In the example above the **ED25519** algorithm is used, other variants are **ECDSA** or **RSA**. Newer SSH clients will try to use ED25519. | ||
+ | == Access '' | ||
- | ==== Transferring data ==== | + | Load your ssh key in '' |
- | The jump host does not provide access to any storage (home directories, | + | < |
+ | Connection -> Proxy | ||
+ | -> Proxy Hostname: login.computational.bio.uni-giessen.de | ||
+ | -> Port: 22 | ||
+ | -> Proxy type: SSH to proxy and use port forwarding | ||
+ | -> Username: < | ||
- | Data transfer is only possible using another dedicated host, **transfer.computational.bio.uni-giessen.de**. User are able to connect to this host via **sftp** or **rsync** only. | + | Connection -> Data |
+ | -> Auto-login username: < | ||
- | TODO: add example | + | Session -> |
+ | -> Hostname: cli.intra | ||
+ | -> Port: 22 | ||
+ | # If you want to use agent-forwarding: | ||
+ | Connection -> SSH -> Auth | ||
+ | -> Allow agent forwarding: activate | ||
+ | </ | ||
- | ==== Deprecated: access via lummerland.computational.bio.uni-giessen.de | + | ==== Transferring data ==== |
- | The setup composed of jump host for interactive sessions and the dedicated transfer host replaces the former ssh access | + | The jump host does not provide |
+ | Data transfer is only possible using another dedicated host, **transfer.computational.bio.uni-giessen.de**. User are able to connect to this host via **sftp** or **rsync** only. | ||
- | ===== Generating and uploading keys ===== | + | === Transfer files with scp === |
- | With a recent change to our setup the SSH keys on our system are managed centrally in our LDAP infrastructure. You can add you own public keys using our [[https:// | + | Add the following configuration to your ssh-config file. |
+ | < | ||
+ | Host transfer-bcf | ||
+ | HostName transfer.computational.bio.uni-giessen.de | ||
+ | User < | ||
+ | </ | ||
- | ==== Preliminary Setup ==== | + | Now you should be able to transfer files from and to the bcf-system (your ssh key must be available in the ssh-agent). |
- | Setting up public key authentication to access | + | < |
+ | # Upload | ||
+ | > scp test transfer-bcf:/ | ||
+ | test 100% 0 0.0KB/s 00:00 | ||
- | ==== Connect with Windows ==== | + | # Download a file |
+ | > scp transfer-bcf:/ | ||
+ | ## No output | ||
+ | </ | ||
- | Download and install putty distribution (putty installer): | + | This should work with any openssh client release starting with version 9.0. Older releases might not work at all or might require using the undocumented option '' |
- | http:// | + | === Transfer files with rsync === |
- | === Step 0: Convert an OpenSSH key to PPK === | + | Use the same configuration as in the '' |
- | This step is only needed when you've already created | + | < |
+ | # Upload | ||
+ | > rsync -v test transfer-bcf:/ | ||
+ | test | ||
- | You have to copy the file " | + | sent 81 bytes received 42 bytes 246.00 bytes/sec |
+ | total size is 0 speedup is 0.00 | ||
- | The program will ask you for the password of the private key. After correctly entering it, you click on "Save private key" to store the SSH-key in the PPK-format. After this you can forward to Step 2 (When you are a first time user) or Step 3 (When you can already login on Linux/OSX on " | + | # Download a file |
+ | > rsync -v transfer-cb:/vol/ | ||
+ | test | ||
- | === Step 1: Generating the public/private-key pair === | + | sent 38 bytes received 89 bytes 84.67 bytes/sec |
+ | total size is 0 speedup is 0.00 | ||
+ | </ | ||
- | Generate a public/ | + | === Transfer files with sftp === |
- | < | + | Use the same configuration as in the '' |
- | Click the Generate button. You will be prompted | + | < |
+ | > sftp transfer-bcf:/ | ||
+ | Connected to transfer-bcf. | ||
+ | Changing | ||
+ | sftp> put test | ||
+ | Uploading test to / | ||
+ | test 100% 0 0.0KB/s | ||
+ | sftp> get test | ||
+ | Fetching / | ||
+ | sftp> exit | ||
+ | </code> | ||
- | < | + | === Transfer files with other tools === |
- | Enter a passphrase in the "Key passphrase" | + | Transfering data is not restricted to the command line tools presented above. You can use any tool that supports the sftp-protocol or the rsync protocol. For detail on how to setup these tools refer to the documentation of these tools. |
- | :!:**Under no circumstances should you leave these fields blank!** | + | ==== Using git over ssh ==== |
- | Select all of the text in the box labeled " | + | SSH connections to the internet are also possible via the central jump host. In order to tell git to use the jump host, you may edit your **ssh config file** or you may set the **core.sshCommand** variable. |
- | < | ||
- | **The private key must be kept secret.** Accordingly, | + | === Setting |
- | === Step 2: Copying the public key to the BCF infrastructure === | + | It might be the easier |
- | + | ||
- | You can upload your new **public** key to the BCF user management using the [[https:// | + | |
- | + | ||
- | **The private key is not installed on any remote host and stays on your normal PC!** | + | |
- | + | ||
- | {{anchor: | + | |
- | === Step 3: Logging in with SSH === | + | |
- | + | ||
- | Start PUTTY on your own PC to verify that public key authentication works. Basic public key authentication is enabled for a particular session in the Connection > SSH > Auth window. You must create a specific session profile (<imgref add_session> | + | |
- | + | ||
- | Select " | + | |
- | + | ||
- | Select " | + | |
- | + | ||
- | < | + | |
- | + | ||
- | < | + | |
- | + | ||
- | < | + | |
- | + | ||
- | After this you can log into your account with SSH by double clicking on your session profile in the PUTTY client. | + | |
- | + | ||
- | {{anchor: | + | |
- | === Step 4: Adding auto-login with Pageant === | + | |
- | + | ||
- | At first glance, basic public key authentication offers no advantages since a passphrase is always required. However, single signon can be achieved by setting up the PuTTY authentication agent, Pageant (pronounced page-ant). | + | |
- | + | ||
- | Starting " | + | |
- | + | ||
- | < | + | |
- | + | ||
- | When the " | + | |
- | + | ||
- | ==== Connect with Linux/Mac OS X ==== | + | |
- | + | ||
- | === Plan ahead === | + | |
- | + | ||
- | If you have already used SSH on your machine, chances are that a default key already exists. If you generate a new key without specifying a different identity, the default key will be overwritten. As a result all accounts using this key will become inaccessible for you. | + | |
- | + | ||
- | **WE THUS RECOMMEND NOT TO USE THE DEFAULT IDENTITY, BUT USE SEPARATE KEYS FOR INDIVIDUAL ACCOUNTS!** | + | |
- | + | ||
- | This tutorial uses '' | + | |
- | + | ||
- | === Generate a new SSH key === | + | |
- | + | ||
- | Open a terminal and use the '' | + | |
- | + | ||
- | Example: | + | |
- | + | ||
- | < | + | |
- | + | ||
- | with: | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | + | ||
- | This example command will create two files: '' | + | |
- | + | ||
- | You'll be asked to enter a passphrase. See Step 1 in the Windows section of this wiki for generating a good password. | + | |
- | + | ||
- | After you enter a passphrase, you'll be given the fingerprint, | + | |
- | + | ||
- | < | + | |
- | # Your public key has been saved in / | + | |
- | # The key fingerprint is: | + | |
- | # 01: | + | |
- | + | ||
- | Newer SSH releases may use a different format for the fingerprint, | + | |
- | + | ||
- | < | + | |
- | SHA256: | + | |
- | + | ||
- | In this case you can display the older MD5 based fingerprint using the '' | + | |
< | < | ||
- | $ ssh-keygen | + | git config |
- | 2048 MD5: | + | |
</ | </ | ||
- | It might be a good idea to temporary note down the fingerprint, | ||
+ | === Editing the ssh config file === | ||
- | === Copy the public key to your JLU account === | + | Per default |
- | You can uplod your new key to the BCF user management using the [[https:// | + | A basic configuration |
- | + | ||
- | You are **not able** to use tools like ssh-copy-id on the BCF systems! | + | |
- | + | ||
- | === Login with SSH === | + | |
- | + | ||
- | Open a terminal and type in the following command: | + | |
- | + | ||
- | < | + | |
- | + | ||
- | On all modern Linux distributions and Mac OS X a small window will appear which will ask you for your password used at the generation of the private key. You can now allow the keyring manager of Linux/OSX to store this password in the user keyring of your operating system. After this you don't need to enter the password another time. | + | |
- | + | ||
- | **Remember: | + | |
- | + | ||
- | Every person who has access to your account on your PC can login with SSH to your JLU account. | + | |
- | + | ||
- | === Setup fast login === | + | |
- | + | ||
- | To speed up login into your account you can use the ssh configuration | + | |
< | < | ||
- | Host lummerland | + | Host github.com gitlab.com bitbucket.com |
- | | + | |
- | User username | + | |
- | IdentityFile ~/ | + | |
</ | </ | ||
- | You have to change " | + | Beware that the ssh configuration |
- | + | ||
- | Now you can login with the following command: | + | |
- | + | ||
- | < | + | |
- | + | ||
- | ==== Security Considerations ==== | + | |
- | + | ||
- | The link is not working any longer, but kept if becoming available again. | + | |
- | + | ||
- | < | + |
system/beginners/remoteaccess.1724255592.txt.gz · Last modified: 2024/08/21 15:53 by blinke