[CentOS] Moving sshd listen port

2014-07-09 Thread Mike McCarthy, W1NR
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am having a problem getting sshd to run after changing it's default port. I edit sshd_config and set the desired port, open it with firewall-cmd and then issue a systemctl start sshd. No error gets reported on the console but the following is

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Jonathan Billings
On Wed, Jul 09, 2014 at 10:35:12AM -0400, Mike McCarthy, W1NR wrote: I am having a problem getting sshd to run after changing it's default port. I edit sshd_config and set the desired port, open it with firewall-cmd and then issue a systemctl start sshd. No error gets reported on the console

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Mike McCarthy, W1NR
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This was a minimal install for a virtual server and semanage is not available so the command doesn't work... What package is semanage in? Mike On 07/09/2014 10:45 AM, Jonathan Billings wrote: On Wed, Jul 09, 2014 at 10:35:12AM -0400, Mike

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Mike McCarthy, W1NR
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 SELinux is not running. Any other ideas? Mike On 07/09/2014 10:50 AM, Mike McCarthy, W1NR wrote: This was a minimal install for a virtual server and semanage is not available so the command doesn't work... What package is semanage in? Mike

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Wes James
On Jul 09, 2014, at 08:54 AM, Mike McCarthy, W1NR sy...@w1nr.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 SELinux is not running. Any other ideas? Mike   I did a google search on how to install semanage and found this:

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Robert Moskowitz
On 07/09/2014 10:54 AM, Mike McCarthy, W1NR wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 SELinux is not running. Any other ideas? Did you update your IPTable? I change my SSHD port all the time. One of the first things I do on setting up a server. I know this is just

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Mike McCarthy, W1NR
Not using IPTables. Using firewalld and yes, I opened the new port there as well. Mike On 07/09/2014 11:08 AM, Robert Moskowitz wrote: On 07/09/2014 10:54 AM, Mike McCarthy, W1NR wrote: SELinux is not running. Any other ideas? Did you update your IPTable? I change my SSHD port all the

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Jonathan Billings
On Wed, Jul 09, 2014 at 10:54:29AM -0400, Mike McCarthy, W1NR wrote: SELinux is not running. Any other ideas? Checking the firewall is useful, but it sounds like you can't get the service to start in the first place. It might be helpful if you gave us the full error output. Do you get more

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Mike McCarthy, W1NR
Nothing more than what was in messages namely 'code=exited, status=255/n/a' which looks an awful lot like a printf of an uninitialized variable... Mike On 07/09/2014 11:21 AM, Jonathan Billings wrote: On Wed, Jul 09, 2014 at 10:54:29AM -0400, Mike McCarthy, W1NR wrote: SELinux is not running.

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Vipul Agarwal
On 09/07/14 15:35, Mike McCarthy, W1NR wrote: sshd.service: main process exited, code=exited, status=255/n/a Hi Mike Can you run sshd manually in debugging mode and paste the output please: $ /usr/sbin/sshd -d It's worth looking at the output of strace that may help here: $ strace

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Robert Moskowitz
On 07/09/2014 10:50 AM, Mike McCarthy, W1NR wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This was a minimal install for a virtual server and semanage is not available so the command doesn't work... What package is semanage in? Had to dig back in my notes: policycoreutils-python

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Mike McCarthy, W1NR
/usr/sbin/sshd -d seems to work properly and accept connections at the new port. So does typing /usr/sbin/sshd, which daemonizes and runs manually. It now appears that it will not start as a service if I change the port, even after a reboot. Mike On 07/09/2014 11:32 AM, Vipul Agarwal wrote:

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Ian Pilcher
On 07/09/2014 09:54 AM, Mike McCarthy, W1NR wrote: SELinux is not running. Any other ideas? Are you sure? (It's enabled by default.) What does 'getenforce' say? -- Ian Pilcher

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Ian Pilcher
On 07/09/2014 09:50 AM, Mike McCarthy, W1NR wrote: This was a minimal install for a virtual server and semanage is not available so the command doesn't work... What package is semanage in? # yum provides '*/semanage' It's in policycoreutils-python. --

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Mike McCarthy, W1NR
Well, getenforce says enforcing but 'systemctl status selinux' says 'Active: inactive (dead)' ? Mike On 07/09/2014 11:45 AM, Ian Pilcher wrote: On 07/09/2014 09:54 AM, Mike McCarthy, W1NR wrote: SELinux is not running. Any other ideas? Are you sure? (It's enabled by default.) What does

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Ned Slider
On 09/07/14 16:45, Robert Moskowitz wrote: On 07/09/2014 10:50 AM, Mike McCarthy, W1NR wrote: This was a minimal install for a virtual server and semanage is not available so the command doesn't work... What package is semanage in? Had to dig back in my notes: policycoreutils-python

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Jonathan Billings
On Wed, Jul 09, 2014 at 11:57:21AM -0400, Mike McCarthy, W1NR wrote: Well, getenforce says enforcing but 'systemctl status selinux' says 'Active: inactive (dead)' ? Sounds like you have SELinux enabled. It's not a service. If you look at the line right above the Active line you pasted, you'd

Re: [CentOS] Moving sshd listen port SOLVED

2014-07-09 Thread Mike McCarthy, W1NR
After installing the correct utilities and setting the port with semanage, it now works. Thanks to all for this one. Looks like I got some real work to do moving from 6 to 7 and understanding the massive management changes that were made. Mike On 07/09/2014 12:04 PM, Jonathan Billings wrote: I

Re: [CentOS] Moving sshd listen port

2014-07-09 Thread Ian Pilcher
On 07/09/2014 10:50 AM, Mike McCarthy, W1NR wrote: /usr/sbin/sshd -d seems to work properly and accept connections at the new port. So does typing /usr/sbin/sshd, which daemonizes and runs manually. It now appears that it will not start as a service if I change the port, even after a reboot.

Re: [CentOS] Moving sshd listen port SOLVED

2014-07-09 Thread Liam O'Toole
On 2014-07-09, Mike McCarthy, W1NR sy...@w1nr.net wrote: After installing the correct utilities and setting the port with semanage, it now works. Thanks to all for this one. Looks like I got some real work to do moving from 6 to 7 and understanding the massive management changes that were

Re: [CentOS] Moving sshd listen port SOLVED

2014-07-09 Thread Markus Falb
On 09.Jul.2014, at 18:44, Liam O'Toole liam.p.oto...@gmail.com wrote: On 2014-07-09, Mike McCarthy, W1NR sy...@w1nr.net wrote: After installing the correct utilities and setting the port with semanage, it now works. Thanks to all for this one. Looks like I got some real work to do moving

Re: [CentOS] Moving sshd listen port SOLVED

2014-07-09 Thread Mike McCarthy, W1NR
My COS6 server never required me to do that even though SELinux is enabled there (I didn't even know it was until today). Before I even posted the first help I tried the semanage command and found that it was not installed so I assumed wrongly that SELinux was not enabled. Mike On 07/09/2014

Re: [CentOS] Moving sshd listen port SOLVED

2014-07-09 Thread m . roth
Mike McCarthy, W1NR wrote: My COS6 server never required me to do that even though SELinux is enabled there (I didn't even know it was until today). Before I even posted the first help I tried the semanage command and found that it was not installed so I assumed wrongly that SELinux was not

Re: [CentOS] Moving sshd listen port SOLVED

2014-07-09 Thread Robert Moskowitz
On 07/09/2014 02:11 PM, Mike McCarthy, W1NR wrote: My COS6 server never required me to do that even though SELinux is enabled there (I didn't even know it was until today). Before I even posted the first help I tried the semanage command and found that it was not installed so I assumed

Re: [CentOS] Moving sshd listen port SOLVED

2014-07-09 Thread Robert Moskowitz
On 07/09/2014 02:36 PM, m.r...@5-cent.us wrote: Mike McCarthy, W1NR wrote: My COS6 server never required me to do that even though SELinux is enabled there (I didn't even know it was until today). Before I even posted the first help I tried the semanage command and found that it was not

Re: [CentOS] Moving sshd listen port SOLVED

2014-07-09 Thread m . roth
Robert Moskowitz wrote: On 07/09/2014 02:36 PM, m.r...@5-cent.us wrote: Mike McCarthy, W1NR wrote: My COS6 server never required me to do that even though SELinux is enabled there (I didn't even know it was until today). Before I even posted the first help I tried the semanage command and

Re: [CentOS] Moving sshd listen port SOLVED

2014-07-09 Thread Robert Moskowitz
On 07/09/2014 02:58 PM, Reindl Harald wrote: Am 09.07.2014 20:45, schrieb Robert Moskowitz: On 07/09/2014 02:36 PM, m.r...@5-cent.us wrote: Mike McCarthy, W1NR wrote: My COS6 server never required me to do that even though SELinux is enabled there (I didn't even know it was until today).