Practical Examples |
These ssh examples, tips and commands are intended to give you a starting point |
Connecting to a remote SSH server |
|
-v : Print debug information |
Change the SSH Port |
Commands valid for CentOS |
In CentOS the default firewall management tool is FirewallD. To open the new door, run the following commands: |
|
|
Open the SSH configuration file with your text editor |
/etc/ssh/sshd_config |
|
Look for the line that starts with Port 22. In most cases, this line will start with a hash #.Remove the hash # and enter your new SSH port number which will be used in place of the standard SSH port 22, like so: |
|
Be especially careful when editing the SSH configuration file. An incorrect configuration could prevent the SSH service from starting. |
|
Use the new SSH port |
|
Close the port 22 |
|
Firewall reload |
|