-p port
Specifies the port on which the server listens for connections (default 22). Multiple port options are permitted. Ports specified in the configuration file with the Port option are ignored when a command-line port is specified. Ports specified using the ListenAddress option override commandline ports.
Just change the (possibly commented, in which case you obviously need to uncomment it) "Port 22" line in your ssh server configuration file to "Port 1337".
sshd with -p PORT:
You can edit sshd config(/etc/ssh/sshd_config):
You want the
Port
directive in thesshd_config
file, or alternativelysshd -p
.See
man sshd
&man sshd_config
for more information.You should read
man sshd
orman sshd.conf
it is quite clear.Just change the (possibly commented, in which case you obviously need to uncomment it) "Port 22" line in your ssh server configuration file to "Port 1337".