Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VPS 9 Dallas issues with changing Port Number
I've been having issues with changing my port number.  With OS CentOS 7 x86_64 Minimal v2 although I think it is more on the VPS side.

These are the steps I followed for changing the port:

yum install nano
I removed the #comment before Port 22 and changed the 22 to 6382
Then successfully saved it - ctrl X - Y - Enter
Then tried to restart ssh: service sshd restart

An error came up and it wouldn't allow me to restart the service.  Unfortunately I didn't copy the error wording but it basically said that sshd was unavailable.  Of course when I tried to get in again via SSH there was an error.  I then reinstalled the OS again.  Googled the issue.  Tried alternative commands.  But same results.  Once I've done a change in /etc/ssh/sshd_config I can't get in any longer.  At one point I even tried to change back to #Port 22 - the way it was before. I was still unable to get in again.
Thank you to Post4VPS and VirMach for my awesome VPS 9!  
It would be the best to see the error you got.

We're talking about CentOS here. The SELinux enforcement is a big thing on CentOS 7 and later. It might be that you need to unlock the port you want to use for SSH to be allowed to be used for SSH / with the SSH server. There was thing thing here multiple times in the past already where people got this messages and simply ignored them... leaving them locked out of their system and wondering what is going on.

Here is the thing I'm talking about but referencing CentOS 8:

Without the actual error message we can literally only guess into the blind though.

Edit: Let me know if you want me to look at it.
[Image: zHHqO5Q.png]
@Mashiro Thanks for the tip about

I'll check this out.
Thank you to Post4VPS and VirMach for my awesome VPS 9!  
lockThread Closed 

Possibly Related Threads…
Last Post
10-25-2020, 05:34 PM
Last Post: OldMeister
05-09-2019, 04:40 PM
Last Post: Mashiro

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting