To change the port , first edit the file ‘ /etc/ssh/sshd_config ‘ , change the vaule of parameter ‘ port 22 ‘, now restart the ssh service.