ssh to VM

,----

| Host: FreeBSD

| Guest (VM): NetBSD

`----

Make sure `sshd(8)' is running on the guest.

service sshd status

If it's not you might need to add that daemon to the `rc.conf(5)'.

sysrc sshd_enable="YES"

It should run automatically after reboot but for now you probably have to start it manually.

service sshd start

With sshd enabled on guest make sure you try to connect to the correct system (VM) from the host.

Run the following command on the guest to display fingerprint of its public key file.

ssh-keygen -l -f /etc/ssh/ssh_host_ed25519_key.pub

Try to ssh to the guest from host and compare fingerprints.

ssh 

----------------------------------------------------------------------

Transfer host's public key to the guest with `scp(1)'.

scp ~/.ssh/.pub @:

Authorize host's public key on guest.

cat .pub >> ~/.ssh/authorized_keys

It should be now possible to ssh to guest without credentials.

ssh @

Consider adding entry to the `~/.ssh/config' to make it even easier.

Host 
     User 
     HostName 
     IdentityFile ~/.ssh/

Now it's even better.

ssh