Problem: you have a new Samsung tablet or phone with Linux on Dex and you want to ssh into it from your computer. Why? To work with a better keyboard, to use `rsync`, `scp`, `sftp`, move files over sftp from Ubuntu’s Nautilus, etc.
Step 1) Edit
/etc/ssh/sshd_config in Linux on Dex and change:
Port 22 to something above 1024. Example:
ListenAddress and make it listen to the IP address of the tablet (use
ifconfig to get it). Example:
At the very end of the file:
If you connect to another network you’ll have to change the address for
I suggest these other configurations:
Step 2) Every time you start the Linux on Dex container, run the command
sudo mkdir /var/run/sshd
Unfortunately this directory doesn’t survive the termination of the container.
It must be owned by root.
Step 3) Change the ownership of the site certificates
sudo chown dextop /etc/ssh/ssh_host_*
Step 4) Start the ssh daemon in a terminal with
Unfortunately starting it with systemd won’t work (this is a LXD container, not a VM) and starting it with root fails too (same problem)
You can create a bash script for the steps from 2 to 4 and run it
Step 5) Create the directory
~dextop/.ssh in Linux of Dex
chmod 700 ~dextop/.ssh
Step 6) Create a public/private key pair on your computer. I recommend
ssh-keygen -t ed25519 -f ~/.ssh/linux_on_dex
Step 7) Copy your computer’s
~/.ssh/linux_on_dex.pub into the
~/.ssh/authorized_keys in Linux of Dex
Step 8) I recommend to create a
~/.ssh/config file on your computer with this content:
HostName 192.168.0.100 # the address in your network
Port 9022 # the one you choose
Step 9) Connect from your computer with
I noticed that ssh freezes when the tablet is locked so the screen must be on and unlocked. This is far from ideal. If you know a workaround please add a comment to this post.
One thought on “How to ssh into Samsung’s Linux on Dex”
Tanks for sharing. Useful info.