Tag Archives: ssh

Configuring Docker SSH on Bitvise on Windows

Docker on Windows has a lot to be desired. One thing I found uncomfortable to use is the Docker Shell on Windows. As of version 1.11.2, Docker uses MINGW64 extension to provide the UNIX Shell on Windows and even then it operates on the host, i.e. the Windows machine. If you know the current architecture, Docker runs on a Linux VM on top of Windows host. Therefore, what gets typed on Docker console is eventually passed to the VM. Through wonderful Docker documentation I figured I could actually SSH directly into the VM itself, and it’s very easy.

Docker Console on Windows
Docker Console on Windows

For my SSH I use Bitvise SSH client but these steps should apply to any other client such as Putty. Docker provides SSH private key which could be used by any client.

Open Bitvise Client Key Manager, and click on “Import”. Then Navigate to “c:\users\userid\.docker\machine\machines\default” and select “id_rsa” file. Import the file and note down the Location. It should be “Global n” where n=1,2,3 etc.


Next open Bitvise SSH Client. Configure a profile with following details:


Hit login and hopefully you will be logged in!


Creating SSH Key Based Authentication using Bitvise on CentOS

On your client machine (e.g. Laptop)

Start Bitvise Client Key Manager, and click “Generate New”

Select Algorithm “RSA” and Size 4096 (or any other)

Set a Passphrase if required. Enter some comments, and click Generate.

After Key is generated, select it, and click on “Export”. In the Export options, make sure you select “Export public key” and underneath it “OpenSSH format”. Click on Export and save the file somewhere.

On the CentOS Server

Upload the file to your CentOS server, then execute following commands:

Ensure correct SELinux settings

Set correct file permissions

Delete the uploaded file from the server

After this, log off and log on back using Bitvise SSH Client with “Initial method” as “publickey” and select the appropriate Key from the “Client Key” dropdown . If Key was recognized you will be asked for passphrase. If no passphrase was set, you should see the terminal open.