Neulich hatte ich nach der Neuinstallation von Raspian auf dem RaspberryPi das Problem, dass der Zugriff über SSH quälend langsam war. Meistens könnte man den Benutzernamen und das Passwort noch “normal-schnell” eingeben, aber dann dauerte es oft bis zu zehn Minuten bis die gewohnte Willkommens-Nachricht angezeigt wurde.
To solve this problem the following solution helped me.
I know the following notes are always kind of annoying and seem unnecessary. Unfortunately, many people who knew "better" have lost eyes, fingers or other things due to carelessness or injured themselves. Data loss is almost negligible in comparison, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Because even the coolest project is not worth injury or other trouble.
Affiliate links/advertising links
The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and make a purchase via this link, Nerdiy.de will receive a commission from the relevant online shop or provider. The price does not change for you. If you make your purchases via these links, you support Nerdiy.de in being able to offer other useful projects in the future. 🙂
Before you start with this article you should have prepared the RaspberryPi so that it is accessible via the network and controllable via SSH.
The following three articles describe what needs to be done to prepare the RaspberryPi:
RaspberryPi – setup for nerdiys!
RaspberryPi – The first configuration!
RaspberryPi – Control the RaspberryPi via SSH
In the following list you will find all the parts you need to implement this article.
Log in to the RaspberryPi via SSH
To start, you must first log in to the Rasp Pi with Putty via SSH. How to do this is in the article RaspberryPi - Control the RaspberryPi via SSH described.
Change IPQoS value
This change fixes the bug that the SSH connection to your RaspberryPi becomes so slow after entering username and password that operation via the console is no longer possible.
This error only occurs if you access the RaspberryPi via a wireless network. It should not occur with a wired connection.
To fix it you need to enter a command or value change in two configuration files of your SSH client.
To do this, open the first configuration file with the command:
sudo nano /etc/ssh/ssh_config
Now repeat the same with the other configuration file. Open it with:
sudo nano /etc/ssh/sshd_config
… und fügt dort die Wertänderung “IPQoS 0x00” ein. Speichert und schließt die Datei mit “STRG+X” und “Y” zum Bestätigen. Nach einem Neustart des RaspberryPi’s(Befehl “sudo reboot”) sollte Eure Konsolen-Verbindung nun wieder so schnell wie gewohnt sein.
Change value with one command
“Kveldulfur” has left a comment that sometimes it is not possible to navigate to the setting of the value. In this case, the value can be set correctly using only one command. Just enter the following command.
echo "IPQoS 0X00" >> /etc/ssh/ssh_config && echo "IPQoS 0X00" >> /etc/ssh/sshd_config
After that restart your RaspberryPi and the console should respond faster.
Have fun with the project
I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.
Ideas for new projects are always welcome. 🙂
PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂