-
Notifications
You must be signed in to change notification settings - Fork 1
Connectivity problem
- on SD card in the boot folder create a
wpa_supplicant.conf
file, add there
country=<2 letter country code>
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="<your network name>"
psk="<your password>"
}
-
on your PC go to terminal and run
donkey findcar
command, if you have windows or wsl install nmap and runnmap -sn <YOUR_IP>/24
command, it will list all hosts in the network that are up. IP above "(Raspberry Pi Foundation)" is your car's IP. -
Useful command to list all ip-addresses on the network.
arp -a
in PowerShell orarp-scan -I wifi0 -l
in terminal.
It means that somehow OpenBSD Secure Shell server stopped working, e.g. after changes in /etc/ssh/sshd_config
file.
Unfortunately placing a dummy ssh
file in the boot
partition on the SD card doesn't work here.
-
Plug in an HDMI monitor and USB keyboard into the Pi, login (default pi:raspberry)
-
Run
sudo raspi-config
command -
Select
Interfacing Options
-
Navigate to and select
SSH
. ChooseYes
. SelectOk
. ChooseFinish
-
Run
sudo systemctl enable ssh
-
Run
sudo systemctl start ssh
-
If it fails run
systemctl status ssh.service
to see what is the error. -
In my case OpenBSD Secure Shell server failed to run. Before error message has appeared I edited
/etc/ssh/sshd_config
file. It was a huge mistake. So I deleted all my faulty inputs and again ransudo systemctl start ssh
. It started and insystemctl status ssh.service
printed that server is active
-
~/.ssh/config
, the client config, for the computer you're connecting from. /etc/ssh/sshd_config
, on the remote server you're connecting to.
-
TCPKeepAlive yes
in/etc/ssh/sshd_config
-
IPQoS cs0 cs0
in/etc/ssh/sshd_config
??? -
ClientAliveInterval 60
in/etc/ssh/sshd_config
orServerAliveInterval 60
in~/.ssh/config
. -
add in
/etc/sysctl.conf
net.inet.tcp.keepidle = 10000
net.inet.tcp.keepintvl = 10000
net.inet.tcp.always_keepalive = 1 (must be 1 always)
-
Try mosh instead of ssh. Requires a large range of UDP ports to be opened on the firewall.
-
Try tmux
-
Motivation: TCPKeepAlive no means "do not send keepalive messages to the server". When the opposite, TCPKeepAlive yes, is set, then the client sends keepalive messages to the server and requires a response in order to maintain its end of the connection. This will detect if the server goes down, reboots, etc. The trouble with this is that if the connection between the client and server is broken for a brief period of time (due to flaky a network connection), this will cause the keepalive messages to fail, and the client will end the connection with "broken pipe". Setting TCPKeepAlive no tells the client to just assume the connection is still good until proven otherwise by a user request, meaning that temporary connection breakages while your ssh term is sitting idle in the background won't kill the connection. I solved the same problem by editing the file
~/.ssh/config
, not to forgetchmod 600 ~/.ssh/config
:
Host *
ServerAliveInterval 600
TCPKeepAlive no
Restart with sudo systemctl reload sshd.service