LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-18-2010, 11:33 PM   #1
struggled_newbie
Member
 
Registered: Sep 2009
Posts: 125

Rep: Reputation: 15
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
 
Old 05-18-2010, 11:43 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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
 
Old 05-19-2010, 12:32 AM   #3
struggled_newbie
Member
 
Registered: Sep 2009
Posts: 125

Original Poster
Rep: Reputation: 15
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
 
Old 05-19-2010, 12:48 AM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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.

Last edited by paulsm4; 05-19-2010 at 12:50 AM.
 
Old 05-19-2010, 02:35 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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)
 
Old 05-20-2010, 12:53 AM   #6
struggled_newbie
Member
 
Registered: Sep 2009
Posts: 125

Original Poster
Rep: Reputation: 15
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.....
 
Old 05-20-2010, 01:04 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.

Last edited by jschiwal; 05-20-2010 at 01:46 AM.
 
Old 05-20-2010, 01:05 AM   #8
ajeetsinghraina
Member
 
Registered: May 2010
Location: India
Distribution: Ubuntu 7.04/8.04/8.10/10.04, RHEL 6, OpenSUSE,Mandriva,Fedora, CentOS, XandrOS, Slackware, OpenSolar
Posts: 155

Rep: Reputation: 55
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
 
Old 05-20-2010, 02:30 AM   #9
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Anybody tell me how to open SSH services? ArthurHuang Linux - Networking 3 08-30-2006 11:25 AM
Anybody tell me how to open SSH services? ArthurHuang SUSE / openSUSE 1 08-29-2006 11:39 AM
How to start all the services from command line permanently !! bpandey Linux - General 1 08-26-2004 12:27 AM
Start-Up Services HELP Amir Red Hat 3 09-14-2003 08:20 AM
Start/stop services on start-up koyi Slackware 5 08-04-2003 08:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration