On 07/13/17 06:50, Rick Stevens wrote: > On 07/12/2017 03:39 PM, Dave Ihnat wrote: >> On Wed, Jul 12, 2017 at 05:28:47PM -0500, Doug wrote: >>> How do you move SSH off port 22? Please supply konsole code. >> Dunno about konsole code; it's a single-line change in >> "/etc/ssh/sshd_config", from >> >> Port 22 >> >> to some unused port. > To be clear, edit /etc/ssh/sshd_config using your favorite editor. > Around line 17, you'll see: > > #Port 22 > > Change that to read > > Port 222 > > or whatever port you want it on. Then: > > $ sudo systemctl restart sshd.service > > To confirm it: > > $ sudo netstat -lpnt | grep sshd > > You should see something like: > > tcp 0 0 0.0.0.0:222 0.0.0.0:* > LISTEN 1429/sshd > tcp6 0 0 :::222 :::* > LISTEN 1429/sshd > > The first line is sshd listening on port 222 for IPV4 connections, > the second is the same for IPV6 and may not be present if you have > disabled IPV6. The "1429" is the PID of the sshd process on my > machine. Your PID will probably be different. And don't forget 2 other items.... One has to open the chosen port on the firewall if you're running one. And if you're running selinux in enforcing mode you'll need to generate a policy to allow sshd to bind to the chosen port. -- Fedora Users List - The place to go to speculate endlessly
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx