SSH FAQ 问题记录

六月 26, 2024 [网络与安全] #SSH 与远程连接 #obsidian #合集

SSH FAQ 问题记录

The issue

I recently ran into the following error when trying to deploy remotely using docker-compose:

ERROR: Secsh channel 14 open FAILED: open failed: Connect failed

The issue is that the default SSH connections allowed is set to 10 and the command I was running was trying to use more connections then that.

Fixing the error

To fix this error you’ll need to connect to your server via SSH and edit the /etc/sshd_config file. Find the MaxSessions line and uncomment it. The default is 10 as mentioned, I set mine to 20 instead:

MaxSessions 20

Then restart the ssh service:

sudo service ssh restart

After that I could run my command successfully, hope this helps you as well!