Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have tried using chkconfig sshd on for my CentOS server but every time I reboot I still have to manually start the sshd service. Seems to defeat the purpose of having a remote connection. Also, is there a reason that the default for this is to not have sshd start automatically? Is this a security best practice? I'm sure there is a reason it doesn't default to on but I can't figure it out
I'm at work now so I'll have to get the other info later. I used to be able to ssh from outside my house using the server's public IP but now when I try that it keeps timing out. So that is something else I will need to figure out
Try that. Your sysconfig should automatically redirect you, but try that. Later linux versions use this.
The first time, also say
#systemctl start sshd.service
Thanks for all the advice. I checked my public ip yesterday and it was still the same as I had been using. I am going to sign up for a free account on afraid.org
If the IP hasn't changed, might you have changed the listening port in sshd_config without also changing your router's port forwarding to reflect the new port? I think once you check /var/log/secure and /var/log/messages for sshd entries you'll know more; if there's something wrong with the configuration then that's going to be responsible for an inability to ssh in from outside. That being said it can't hurt to manage a potentially changing IP address, but I recommend making sure you pin down the root of the problem before moving on.
I have tried using chkconfig sshd on for my CentOS server but every time I reboot I still have to manually start the sshd service. Seems to defeat the purpose of having a remote connection. Also, is there a reason that the default for this is to not have sshd start automatically? Is this a security best practice? I'm sure there is a reason it doesn't default to on but I can't figure it out
as root you can also run setup and perform the check via the dialog box that will popup. i think there might be something bugged with chkconfig in CentOS 6.x atm. when i run
Code:
[root@centos ~]# chkconfig sshd
[root@centos ~]#
there is zero output, but when I look at my services via setup, sshd is configured to[*], meaning start at boot and mine does start at boot.
Try that. Your sysconfig should automatically redirect you, but try that. Later linux versions use this.
The first time, also say
#systemctl start sshd.service
i think i also read somewhere that systemctl is taking over.
So, I am running runlevel 5. I'm a noob and still like the gui as a safety net but most of the time I'm ssh in through the terminal. If the runlevel is part of the problem I can change it to boot in 3.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.