2  Create SSH-Key

To be able to connect to bwCloud from your local machine, you first need to create a SSH-key to handle authentication.

2.1 What is SSH?

SSH (Secure Shell) is a software package that enables secure system administration and file transfers over insecure networks. It is used in nearly every data center and in every large enterprise.

Although SSH provides an encrypted connection, using passwords with SSH connections would leave our virtual machine (VM) in bwCloud vulnerable to attacks. Therefore, we connect to our VM over SSH using a public-private key pair, also known as SSH keys.

  • The public key is placed on your VM.

  • The private key remains on your local system. Protect this private key. Do not share it.

When you use an SSH client to connect to your VM (which has the public key), the remote VM tests the client to make sure it has the correct private key. If the client has the private key, it’s granted access to the VM.

2.2 Create SSH-Keys in Windows

Follow the instructions provided in bwCloud: SSH-Key Paar erzeugen

2.3 Create SSH-Keys in MacOS

2.3.1 Create key

Open a terminal and run the following command:

ssh-keygen

This will output:

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/username/.ssh/id_rsa):

Press enter to save your keys to the default /Users/username/.ssh directory.

After entering and confirming your password, you’ll see something like the following:

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/username/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/username/.ssh/id_rsa
Your public key has been saved in /Users/username/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:BOJAxs0Rkhusd9Hq/xdqWDnfd1cdxN5Uk+hD2gNwNLA1HvUM username@somename.local
The key's randomart image is:
+---[RSA 3072]----+
| .o*O ..D.BB+...o|
|  .*. .  +o+=E...|
|   ..        ..oo|
|    . ..    oo o=|
|   . . .S     o +|
|           . .  .|
|   ..o. . D.     |
|   .+. .   XC    |
|  .o.o.   L.     |
+----[SHA256]-----+

2.4 Set permissions

Next, we use chmod to change permissions (otherwise, bwCloud will refuse the connection).

In Unix and Unix-like operating systems, chmod is the command and system call used to change the access permissions of files and directories. The name chmod was chosen as an abbreviation of change mode.

Chmod 700 sets folder permissions so that only the owner can read, write and execute files in this folder:

chmod 700 .ssh

Permissions of 600 mean that the owner has full read and write access to the file, while no other user can access the file:

chmod 600 .ssh/id_rsa

2.5 Mac Finder

  1. Open Finder and navigate to your/Users/username/

If you don’t find your home: In Finder, click on the menue and choose: Finder > Preference > Sidebar > Show these items in the sidebar and checkmark the box beside the home icon.

  1. Now press the Command + Shift + . (period) keys at the same time. The hidden files will show up as translucent in your folder.

  2. Open the folder .ssh.

  3. You should see your public SSH key (id_rsa.pub) and private SSH key (id_rsa)

2.6 Import public key

  1. Open your bwCloud Dashboard

  2. Navigate to Key Pairs in the left side menue.

  3. Click on Import Public Key

  4. Provide a Key Name and choose Key Type SSH Key.

  5. Now open your public key id_rsa.pub in a code editor like VS Code and copy and paste the content into Public Key