How to modify ssh default 22 port number

  
 

Modified /etc/ssh/sshd_config file
[root@linux~]# vi /etc/ssh/sshd_config# $OpenBSD: sshd_config,v 1.69 2004/05/23 23:59:53 dtucker Exp $ # This is the sshd server system-wide configuration file. See# sshd_config(5) for more information.# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin# The strategy used for Options in the default sshd_config shipped with# OpenSSH is to specify options with their default value where# possible, but leave them commented. Uncommented options change a# default value.Port 8284 //Before this is preceded by ##, and the default is 22 Ok, change it. #Protocol 2,1#ListenAddress 0.0.0.0#ListenAddress ::# HostKey for protocol version 1#HostKey /etc/ssh/ssh_host_key# HostKeys for protocol version 2#HostKey /etc/ssh/ssh_host_rsa_key#HostKey /etc/ssh/ssh_host_dsa_key


Restarting the ssh service, modifying the port takes effect
[root@linux ~]# /etc/init.d/sshd restartStopping sshd: [ OK ]Starting sshd : [ OK ][root@linux ~]#


is Test is correct, you can use the netstat -an command to view it.
zh-CN"],null,[0.77368784],zh-CN"]]]

Copyright © Windows knowledge All Rights Reserved