I want to change the ssh port from 22 to 2800. I tried to change the /etc/ssh/ssh_config
and removed the # from Port line and changed the number to 2800. after trigger the command: service ssh restart
The connection continued. When I tried to connect from the port 2800, It refused.
The Content of /etc/ssh/ssh_config
is: Removed commented lines
Host *
Port 2800
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
The command service ssh status
gives the following output:
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2017-09-22 20:31:45 IRST; 1s ago
Main PID: 1825 (sshd)
Tasks: 1
Memory: 724.0K
CPU: 5ms
CGroup: /system.slice/ssh.service
└─1825 /usr/sbin/sshd -D
Sep 22 20:31:45 GoodMind systemd[1]: Starting OpenBSD Secure Shell server...
Sep 22 20:31:45 GoodMind sshd[1825]: Server listening on 0.0.0.0 port 22.
Sep 22 20:31:45 GoodMind sshd[1825]: Server listening on :: port 22.
Sep 22 20:31:45 GoodMind systemd[1]: Started OpenBSD Secure Shell server.
I tried other ports too. But still it has the same status. What do I do wrong?