Skip to content

Installing SSH

Jorge Pérez edited this page Dec 4, 2024 · 4 revisions

What for

Developing connected to VSCode as a SSH tunnel is really comfortable, so here's how to do it.

Steps

  1. Install ssh server

´sudo apt install openssh-server´

  1. Enable it so that it starts when the host is turned on

´sudo systemctl enable ssh´

  1. Start it

´sudo systemctl start ssh´

How to connect to it

  1. Install net-tools to see your IP

´sudo apt install net-tools´

  1. Get your IP. From the enp1s0 network interface

´ifconfig´

  1. From your physical machine, do ssh yourVMUserName@yourIP

ssh jorge@192.168.124.179

How to get it done automatically

  1. Make an ssh key

ssh-keygen -t ed25519

  1. Share that key to the VM

ssh-copy-id -i .ssh/id_ed25519 jorge@192.168.124.179

Clone this wiki locally