Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for How to run OpenBSD 6.3 instance on Vultr
manuel
manuel

Posted on • Originally published atwildauer.io on

     

How to run OpenBSD 6.3 instance on Vultr

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 withsyspatch.

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 'https://fastly.cdn.openbsd.org/pub/OpenBSD' > /etc/installurl && syspatch
Enter fullscreen modeExit fullscreen mode

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

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

echo "permit YOUR_NEW_USER" > /etc/doas.conf
Enter fullscreen modeExit fullscreen mode

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
Enter fullscreen modeExit fullscreen mode

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
Enter fullscreen modeExit fullscreen mode

and restart the ssh daemon with

rcctl restart sshd
Enter fullscreen modeExit fullscreen mode

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 onmy vultr

Populate the/etc/mygate file with your gateway

echo YOUR_GATEWAY > /etc/mygate
Enter fullscreen modeExit fullscreen mode

Populate/etc/hostname.vio0 with following text

inet YOUR_INSTANCE_IP 255.255.254.0 NONEinet6 autoconf -autoconfprivacy -soii
Enter fullscreen modeExit fullscreen mode

Populate/etc/resolv.conf with following text

nameserver 108.61.10.10lookup file bind
Enter fullscreen modeExit fullscreen mode

That’s it. No we have a running OpenBSD 6.3 instance on vultr.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

I’m known as mnlwldr on various platforms. I’m a software developer and live in the southwest of Germany near the France border.
  • Location
    Germany
  • Work
    Software Developer
  • Joined

More frommanuel

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp