On your server add the following line to your /etc/ssh/sshd_config:

    Port 628 # change me to your new favorite ssh_port

Whenever you SSH to your servers, pass the -p flag to specify this port.

Alternatively, update your local step SSH configuration at ~/.step/ssh/config to always use this port for Smallstep-managed hosts.


Match exec "step ssh check-host %h"
  User yourname
  UserKnownHostsFile "/Users/yourname/.step/ssh/known_hosts"
  ProxyCommand step ssh proxycommand --provisioner "sso-ssh" %r %h %p
  Port 628