LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   SSH Services Command to Start (https://www.linuxquestions.org/questions/linux-newbie-8/ssh-services-command-to-start-808744/)

struggled_newbie 05-18-2010 11:33 PM

SSH Services Command to Start
 
Hello Linux Guru's

Is there any alternate command to start acceptance SSH connection instead of using GUI: Start>System Settings>Security Level

paulsm4 05-18-2010 11:43 PM

Hi -

1. Just to be clear: once you set it with the GUI, it *stays* set, doesn't it? You don't have to keep resetting it unnecessarily, do you?

2. But yes, you can do it without the GUI, too.

"chkconfig" is one alternative:
http://www.ruf.rice.edu/~rlug/help/tips-ssh.html

'Hope that helps .. PSM

struggled_newbie 05-19-2010 12:32 AM

Thanks for your answer paul, honestly I dot get your term *stays*, my exact problem afetr I set the redhat 9 and finished the sshd_conf configuration the last step I tried is putting check on ssh services on the Start>System Settings>Security Level using GUI. What if I build again another Redhat 9 Unit with only using command line and no GUI environment?

I've also tried unchecking agauin the ssh services in Start>System Settings>Security Level and input:
chkconfig --add sshd
chkconfig --level 35 sshd on

and I cannot connect the SSH afterall

paulsm4 05-19-2010 12:48 AM

Hi -

You're mixing apples and oranges and pears and kumquats here. Let's break it down:
Quote:

1. ORIGINAL QUESTION:
Q: How can I automatically enable SSHD at boot without using the GUI?
A: Several alternatives.
One of the best (depending on your distro) is "chkconfig".
RH is one of the distros that use "chkconfig" (I didn't know you were using RH until your second post).

2. Q: Why do you want to know? What was the "context" for asking your question?
A: I thought maybe the GUI wasn't working for you (hence my question "does sshd *stay* set?")
I now understand this was just a hypothetical question (in case someday you didn't happen to have a GUI handy).

3. Q: I ran "chkconfig", and sshd stayed off! Why?
A: Because the GUI does TWO things: a) it enables (or disables) the service, ... AND ... b) it turns it on (or off).
"chkconfig" just enables or disables the service - it doesn't turn it on or off.
You can run "/etc/rc.d/init.d/sshd start" (or the equivalent for your distro) to turn the service on from the command line.
Valid rc.d arguments include "start", "stop", and "restart" (among others).
'Hope that helps .. PSM

PS:
I really believe that, for the most part, the "context" question is asked in, is every bit as important as the question itself.

chrism01 05-19-2010 02:35 AM

FYI; if you mean RHL 9 (codename Shrike), that hasn't been updated in years, so its wide open to exploits and can struggle with modern HW.
Consider Fedora 12 or Centos 5.5 (free version of RHEL).
http://en.wikipedia.org/wiki/Red_Hat_Linux
http://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux
http://en.wikipedia.org/wiki/CentOS
http://en.wikipedia.org/wiki/Fedora_(operating_system)

struggled_newbie 05-20-2010 12:53 AM

SSHD
 
Hello Linux Gurus

Same problem again I really can't solve it I am a Linux beginner
I want to automatically start SSH services in my redhat 9. In startup screen it appears to be started and I also reconfigured sshd_config and /etc/rc.d/init.d/sshd restart. My RH9 is currently in runlevel 5 and my remedy is to go in Start>System Settings>Security Level and check SSH service.

What if I reformat it and run in a complete CLI only? is there any command to alter the Start>System Settings>Security Level and check SSH procedure?

Please Help me.....

jschiwal 05-20-2010 01:04 AM

I doubt very many people will remember the menu structure of RH9. It is ancient and you should upgrade it if you will connect it to a network.

There are posts on this site you can search for on how to make ssh more secure. Read the /etc/ssh/sshd_config configuration file. It is well commented. You should 1) disable root logins; 2) use public key authentication; 3)configure the AllowUsers entry for your username, and if the ssh port is exposed to the internet (directly or indirectly via another host) 4)change the default port that ssh uses.

ajeetsinghraina 05-20-2010 01:05 AM

To Make SSH start at the boot time with specified runlevel:

chkconfig --level 235 ssh on


alternative:

Open /etc/rc.local file and add at the last line:

service sshd start

or

/etc/init.d/sshd start

alli_yas 05-20-2010 02:30 AM

Quote:

FYI; if you mean RHL 9 (codename Shrike), that hasn't been updated in years, so its wide open to exploits and can struggle with modern HW.
Consider Fedora 12 or Centos 5.5 (free version of RHEL).
http://en.wikipedia.org/wiki/Red_Hat_Linux
http://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux
http://en.wikipedia.org/wiki/CentOS
http://en.wikipedia.org/wiki/Fedora_(operating_system)
__________________
I echo chrism01's statements on this - I see a lot of questions especially in the Newbie forum regarding Red Hat 9. To be honest this is an ancient distro and is a security nightmare waiting to happen.

Please at all costs if possible; consider RHEL 5, CentOS 5 or Fedora 12 (or 13 which is out soon) - these are active, supported distro's so that if you have problems there are specialists you can turn too.


All times are GMT -5. The time now is 05:41 PM.