On RHEL/Centos/Fedora
Type the following yum command to install openssh client and server.
Configuration of OpenSSH
It’s time to configure our OpenSSH behaviour through the ssh config file, but before editing the/etc/ssh/sshd_config file we need to backup a copy of it, so in case we make any mistake we have the original copy.
Open a terminal and run the following command to make a copy of the original sshd configuration file.
As you can see from the command I typed, I added the original_copy suffix, so every time I see this file I know it is an original copy of the sshd config file.
Referring to the netcat results, the ssh service is running on port 22 on my machine. Very good! What if we want to use another port, instead of 22? We can do that by editing the sshd configuration file.
Set your OpenSSH to listen on TCP port 13 instead of the default TCP port 22. Open the sshd_config file with your favourite text editor and change the port directive to 13.
Restart OpenSSH server so the changes in config file can take place by typing the following command and runnetcat to verify if the port you set for listening is open or not.
Should we verify is our openssh server is listening on port 13, or not?. This verification is necessary, so I am calling my lovely tool netcat to help me do the job.
Do you like to make your openssh server display a nice login banner? You can do it by modifying the content of/etc/issue.net file and adding the following line inside the sshd configuration file.
沒有留言:
張貼留言