notes from mnlwldr

Thoughts about programming and other things I want to share

@mnlwldr on Twitter @mnlwldr on GitHub @mnlwldr on Mastodon

Create a new instance and select OpenBSD 6.3 as operating system. After a minute you can login on your new instance over ssh.

First we set the installurl and then we should patch the machine with syspatch.

The /etc/installurl file contains a single line specifying an OpenBSD mirror server URL. syspatch is a utility to fetch, verify, install and revert OpenBSD binary patches.

echo '' > /etc/installurl && syspatch

Now we create a new user to the system with adduser and then we add them to /etc/doas.conf.

With doas, we can execute commands as another user, for example as root.

echo "permit YOUR_NEW_USER" > /etc/doas.conf

Add a ssh key to you new user. Open a Terminal on your local machine and execute

ssh-copy-id -i path/to/your/public.key YOUR_NEW_USER@server

Switch back to your OpenBSD instance and edit the ssh daemon configuration in /etc/ssh/sshd_config.

We don’t allow login over ssh as root

PermitRootLogin no

We disable login with passsword over ssh

PasswordAuthentication no

Now check the configuration with sshd -t and restart the ssh daemon with rcctl restart sshd Now you should be able to login with YOUR_NEW_USER over ssh without a password. If it works, close your root connection and switch to YOUR_NEW_USER.

We need to set some network informations. You can find all information on my vultr

Populate the /etc/mygate file with your gateway

echo YOUR_GATEWAY > /etc/mygate

Populate /etc/hostname.vio0 with following text

inet6 autoconf -autoconfprivacy -soii

Populate /etc/resolv.conf with following text

lookup file bind

That’s it. No we have a running OpenBSD 6.3 instance on vultr. Maybe, you want configure a webserver now.

Have you written a response to this? Let me know the URL