Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Michael Jack
@mjack@mastodon.bsd.cafe  ·  activity timestamp 2 days ago

Access *BSD Hyper-V guests from your host via ssh:

1) Enable and start the ssh-agent service on your host by running the following in Powershell, as Administrator:

Set-Service -Name "ssh-agent" -StartupType Automatic
Start-Service -Name "ssh-agent"

2) Generate ssh keys on your host, as your regular user:

ssh-keygen

3) Add the following to .ssh/config on your host, as your regular user:

Host *
AddKeysToAgent yes
IdentityFile ~/.ssh/id_ed25519

Host beastie
HostName 172.22.168.238

Adjust HostName to guest IP (run 'ifconfig' on guest)

4) Connect via ssh from your host to your *BSD guest with:

ssh beastie

#runbsd #hyperv #ssh

  • Copy link
  • Flag this post
  • Block
Michael Jack
@mjack@mastodon.bsd.cafe replied  ·  activity timestamp 2 days ago

5) Add the public key from your host to ~/.ssh/authorized_keys on your guest. It will look something like:

ssh-ed25519 AAAA...

6) Exit and reconnect to your guest

ssh beastie

The connection is now using your ssh key to authorize the login, and any set password to unlock the key on the host is provided through ssh-agent

  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.3.21 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login