SSH key

TELIN now suggests to work with ssh-keys: here’s how you can setup a ssh key pair from within our TELIN department.

First check if you have the following open source programs installed: Git Bash, PuTTY, PuTTYgen and WinSCP (and any text editor like Notepad++).

1. Generate a public/private key pair with Git Bash.

  1. Open Git Bash Here from the menu or by right-clicking on the Desktop window.
  2. Issue ssh-keygen -b 4096 -t rsa -N '' -f ~/.ssh/id_rsa in the Git Bash Here window.
  3. Issue ssh-copy-id -p 8822 {your_username}@{workgroup_fileserver}. Replace {your_username} with your TELIN username and {workgroup_fileserver} with your TELIN workgroup server e.g. ddcmfs, digcomfs, gaimfs, ipifs, smacsfs or packages added by the ugent.be domain.
  4. Accept the connection with yes
  5. Type your TELIN password.

Your PC should now recognized by your workgroup server. You can try with ssh -p 8822 {your_username}@{workgroup_fileserver}.ugent.be and after accepting the connection with yes you should be logged in. Exit with the exit command.

2. Reuse your public/private key pair for PuTTY and WinSCP.

PuTTY and WinSCP use some different version of the key, they call is PPK.

  1. Open a recent version of PuTTYgen
  2. Select Convertions -> Import Key from the menu.
  3. Search the id_rsa file in C: -> Users -> your_username -> .ssh
  4. Save the private key in the same location. There is a button for it. You can call it telin.ppk

3. In WinSCP connect to your {workgroup_fileserver}.ugent.be.

  1. type {workgroup_fileserver}.ugent.be in the Host name: dialog.
  2. type 8822 as the port number.
  3. type your username in User name.
  4. Tick the 3 dots in Private key file
  5. Select the telin.ppk file in .C: -> Users -> your_username -> .ssh.
  6. Save the session for later with the Save button.

You should be able to login with the Login button now. The left panel is showing your local disk and the right panel is showing your home directory. You can copy by selecting any file or directory and select the F5 Copy button on the bottom menus.

4. In WinSCP you can connect to the terminal with Manage and Open in PuTTY.

The save session will then also be available in PuTTY under WinSCP temporary session, which you can Load, rename to {workgroup_fileserver}.ugent.be and Save it again.

If you want to do it manually, type the hostname {workgroup_fileserver}.ugent.be, select the telin.ppk file you used as private key in Private key file for authentication: with Browse and save the session for later by not logging in yet, but select Session and giving it a name {workgroup_fileserver}.ugent.be first. Make sure to specify port 8822.

The telin.ppk file is a plain text file. You can open and change it in notepad++.

The key on the server is stored in .ssh/authorized_keys, it’s again a text file and you can add or delete keys manually.