/go/ssh writes the SSH server's configuration file, /etc/ssh/sshd_config, from scratch, using the settings stored in GoAdmio, and then restarts the SSH service. This keeps the SSH setup consistent with what you set in GoAdmio: With the restart argument, it only restarts the service. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Rebuild the configuration and restart SSH
/go/ssh
# Only restart SSH
/go/ssh restart
Options
| Argument | Effect |
|---|---|
| (none) | Rebuilds sshd_config and restarts SSH. |
restart |
Restarts SSH without changing the configuration. |
--serversync |
Rebuilds the configuration with much higher connection limits, for moving a server (see serversync). |
The limits that --serversync changes:
| Setting | Normal | With --serversync |
|---|---|---|
MaxSessions |
10 |
250 |
MaxStartups |
10:30:100 |
250 |
MaxAuthTries |
6 |
100 |
ClientAliveInterval |
0 |
60 |
ClientAliveCountMax |
3 |
5 |
Examples
# Rebuild the configuration
/go/ssh
# Restart only
/go/ssh restart
# Higher limits while migrating a server
/go/ssh --serversync
# Test the configuration without restarting
sshd -t
Output
The command prints nothing. Every run is logged to /var/log/go/ssh.log with a timestamp and the arguments used.
| Outcome | Exit status |
|---|---|
restart |
0 |
| Rebuild | The status of the final restart. |
The service that is restarted is ssh on Ubuntu and sshd on other systems.
See the full reference at /go/ssh and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
