This is a quick blog post describing what is needed to do an initial Ubuntu 17.10 server setup. It show how to set up an additional user so root user is not used by default and how to access the server using key based SSH access. A no thrills quick and dirty write up how I setup my servers. Enjoy.
I needed ssh functionality for Windows cmd when using Git, but I do not want to use git bash. It turns out the git bash ssh tools also work from cmd. All you have to do is add the bin directory they are in to your path.
set path=%path%;"C:\Program Files\Git\usr\bin"
I needed to add my ssh public key to Gitlab. Pretty straight forward generating it using PuttyGen and saving the public and private keys. When I pasted they public key into the dialog in Gitlab and hit “Add key” I got the following error.
The form contains the following errors:
- Key is invalid
- Key should be a single line
- Fingerprint has already been taken
- Fingerprint cannot be generated
I checked the public key and saw that it was not a single line. To correct this I did the following.
- Deleted the “—- BEGIN SSH2 PUBLIC KEY —-” line
- Deleted the “—- END SSH2 PUBLIC KEY —-” line
- Deleted the “Comment: …” line
- Removed all line ends from the generated key
- Added “ssh-rsa ” before the key
- Make sure there is an empty line after the key