Professional Documents
Culture Documents
Nmcli
Nmcli
Nmcli
• Open the SSH server configuration file using a text editor. Typically,
this file is located at /etc/ssh/sshd_config:
• Within the SSH server configuration file, find the line that specifies the port. It looks like
this:
• bash
• #Port 22
• Remove the # symbol at the beginning of the line (if present) to uncomment it, and then
change 22 to 2223:
• bash
• Port 2223
• Save and Close the File:
• After making the change, save the file and exit the text editor.
• bash
• sudo firewall-cmd --zone=public --add-port=2223/tcp --permanent
• sudo firewall-cmd --reload
• netstat: Command to display network connections, routing tables,
interface statistics, masquerade connections, and multicast
memberships.
• -tuln: Options to display TCP (-t) and UDP (-u) listening sockets,
show numerical addresses (-n) instead of resolving hostnames, and list
listening sockets (-l).
• Verify SSH Port Change:
• You can verify that the SSH server is now listening on port 2223 by
running:
• bash
• sudo netstat -tuln | grep 2223