system:beginners:remoteaccess
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
system:beginners:remoteaccess [2024/10/16 15:11] – added remark for older scp clients blinke | system:beginners:remoteaccess [2025/04/16 08:13] (current) – Remove old lummerland stuff sbeyvers | ||
---|---|---|---|
Line 217: | Line 217: | ||
</ | </ | ||
- | Beware that the ssh configuration file is used by openssh for all ssh connections and not only when using git! | + | Beware that the ssh configuration file is used by openssh for all ssh connections and not only when using git! |
- | + | ||
- | + | ||
- | ==== Deprecated: access via lummerland.computational.bio.uni-giessen.de ==== | + | |
- | + | ||
- | The setup composed of jump host for interactive sessions and the dedicated transfer host replaces the former ssh access host, **lummerland.computational.bio.uni-giessen.de**. This host will be removed in the near future. Please change your configuration accordingly. | + | |
- | + | ||
- | + | ||
- | ===== Generating and uploading keys ===== | + | |
- | + | ||
- | 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:// | + | |
- | + | ||
- | + | ||
- | ==== Preliminary Setup ==== | + | |
- | + | ||
- | Setting up public key authentication to access a particular remote host is a one-time procedure comprising a few steps which is roughly the same on all operating systems. | + | |
- | + | ||
- | ==== Connect with Windows ==== | + | |
- | + | ||
- | Download and install putty distribution (putty installer): | + | |
- | + | ||
- | http:// | + | |
- | + | ||
- | === Step 0: Convert an OpenSSH key to PPK === | + | |
- | + | ||
- | This step is only needed when you've already created a OpenSSH key under Linux or Mac OSX and want to use this key in Putty under Windows. | + | |
- | + | ||
- | You have to copy the file " | + | |
- | + | ||
- | 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 " | + | |
- | + | ||
- | === Step 1: Generating the public/ | + | |
- | + | ||
- | Generate a public/ | + | |
- | + | ||
- | < | + | |
- | + | ||
- | Click the Generate button. You will be prompted to move the mouse over the blank area to generate some randomness. Do so. Shortly thereafter, the program will generate the key and display the result (see <imgref after_keys> | + | |
- | + | ||
- | < | + | |
- | + | ||
- | Enter a passphrase in the "Key passphrase" | + | |
- | + | ||
- | :!:**Under no circumstances should you leave these fields blank!** | + | |
- | + | ||
- | Select all of the text in the box labeled " | + | |
- | + | ||
- | < | + | |
- | + | ||
- | **The private key must be kept secret.** Accordingly, | + | |
- | + | ||
- | === Step 2: Copying the public key to the BCF infrastructure === | + | |
- | + | ||
- | 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 -l -E md5 -f < | + | |
- | 2048 MD5: | + | |
- | </ | + | |
- | + | ||
- | It might be a good idea to temporary note down the fingerprint, | + | |
- | + | ||
- | + | ||
- | === Copy the public key to your JLU account === | + | |
- | + | ||
- | You can uplod your new key to the BCF user management using the [[https:// | + | |
- | + | ||
- | 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 file '' | + | |
- | + | ||
- | < | + | |
- | Host lummerland | + | |
- | HostName lummerland.computational.bio.uni-giessen.de | + | |
- | User username | + | |
- | IdentityFile ~/ | + | |
- | </ | + | |
- | + | ||
- | You have to change " | + | |
- | + | ||
- | 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.1729091503.txt.gz · Last modified: 2024/10/16 15:11 by blinke