April 3, 2022

[Note] Chromebook Linux VM

It creates a user.  Change its password:

$ sudo su

# passwd <username>

SSH to Chromebook Linux VM ("CLV" from here for short):

  1. Enable sshd in CLV.
  2. ssh from CLV to another system (e.g. Linux, Mac with SSHD set up) with tunneling.
  3. From linux/mac (or any system with SSHD), ssh to the tunneling port.

$ sudo su

# cd /etc/ssh
# rm sshd_not_meant_to_be_run
# vi /etc/ssh/sshd_config

Define/uncomment these:

Port 2020
AllowAgentForwarding yes
AllowTcpForwarding yes

Restart sshd service:

$ sudo systemctl start ssh
$ sudo systemctl enable ssh

From CLV, ssh to the target machine to establish the tunneling:

$ ssh -f -N -T -R 2020:localhost:2020 <userid>@<target machine>

From the target machine, you can SSH to CLV

$ ssh -p 2020 <CLV username>@localhsot

NOTE: if the Chromebook is on battery, it may go to sleep and break the connection while you're connect to it via SSH.