I am trying to SSH into my Raspberry Pi 4b with Ubuntu MATE installed as OS. This works perfectly fine when I first login on my raspberry pi (as this seems to enable some SSH client to start-up). To achieve this I have done the following;
- Create a key on my laptop
- Copy key to raspberry pi
- etc. (standard steps)
I can SSH (using OpenSSH_7.6p1) without providing a password as expected. However, I need to login on Ubuntu MATE in order to be able to SSH into it from another system (my laptop). I obviously don't want to login on my Raspberry Pi every time I power it on (connect screen, connect keyboard etc.).
I SSH with;
name@name2:~$ ssh ubuntu@^address
and receive;
ssh: connect to host ^address port 22: No route to host
^address
being the placeholder for the ip. This command works perfectly when I have manually logged into my Raspberry Pi!
To solve the issue I believe I have tried everything answered on this site;
- This which should enable SSH on boot
- This (third answer) which alters the startup procedure for ssh socket and service
- This (and many other duplicates) which changes the location of the authorized_keys from
/home/name
to/etc/ssh
- Multiple different variations of
sudo systemctl ...
andsudo service ssh restart
etc. etc.
Therefore, I am really at a loss on what to do. I feel like the third bullet point makes a lot of sense but still no luck.
All quite vague, so please ask me for any output of commands to help with your answer!