You are not logged in.

#1 2003-07-22 12:11:42

iKevin
Member
From: Ann Arbor, MI
Registered: 2003-07-20
Posts: 130

Problem starting sshd

Hi All,

I have pretty much setup arch from ftp install and I am very pleased.  However, I do have one problem.

I installed openssh so that I can connect to this box, which is in my basement, and administer it.  After installing openssh, I found that sshd was put in /etc/rc.d and I antipated keeping all of the defaults.  However, I noticed that sshd was/is not running after I boot.  I found the following in the "auth" log:

Jul 20 13:15:11 deadface sshd[187]: Server listening on :: port 22.
Jul 20 13:15:11 deadface sshd[187]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
Jul 20 13:15:28 deadface sshd[190]: refused connect from 0.0.0.0
Jul 20 13:15:45 deadface sshd[193]: refused connect from 0.0.0.0
Jul 20 13:41:45 deadface sshd[235]: refused connect from 0.0.0.0
Jul 20 23:18:51 deadface sshd[187]: Received signal 15; terminating.

Using google, I found that the first "error" line is just a warning and is OK but the rest doesn't look good.

The odd thing is I can go into /etc/rc.d and execute:

./sshd start

and everything works fine.  Can anyone give me a hint how to tackle this issue?

Thanks
Kevin

Offline

#2 2003-07-22 14:40:56

Bobonov
Member
From: Roma - Italy
Registered: 2003-05-07
Posts: 295

Re: Problem starting sshd

Jul 20 13:15:11 deadface sshd[187]: Server listening on :: port 22.

The server is up and running, normal message.

Jul 20 13:15:11 deadface sshd[187]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.

Another program is already using port 22, probably an old ssh daemon running that you didn't kill.

Jul 20 13:15:28 deadface sshd[190]: refused connect from 0.0.0.0
Jul 20 13:15:45 deadface sshd[193]: refused connect from 0.0.0.0
Jul 20 13:41:45 deadface sshd[235]: refused connect from 0.0.0.0

Failed attemp to login.

Jul 20 23:18:51 deadface sshd[187]: Received signal 15; terminating.

SSHD Server shutdown

Now some other clarification.

After installing openssh, I found that sshd was put in /etc/rc.d

This is not the the server but the script that start it.

In /etc/rc.d/  there are all the scripts that starts and stop  the daemons.

But they do not start automatically you have to put the script name in /etc/rc.conf

In this file  you have to specify all the daemon to start during booting.
If you look at it there is a section that looks like:
DAEMONS = (httpd sshd mysql)
If you put a ! in front of the name this daemon is not going to be started.

And now some questions:
1) How do you start sshd (from console or at bootup)?
2) Did you use root to connect?

Some more notice.
The sshd package came with root login disabled, so you have to reconfigure sshd to accept root connection or (best option) create another user then connect with this one and then su to root.

If you start sshd manually

/etc/rc.d/sshd start

then, after a  reboot,  do an

ps -eax | grep sshd

to see if there are other sshd daemon running.

Sorry if I wrote something that is obvious for you but  from your post your level is not very clear.

Offline

#3 2003-07-22 15:43:32

iKevin
Member
From: Ann Arbor, MI
Registered: 2003-07-20
Posts: 130

Re: Problem starting sshd

Ah, thanks for the reply.  I understand things a bit more.  I new that it wasn't the server and that it was just a script to start it. My old distro used /etc/init.d and when I didn't see it I assumed that things in /etc/rc.d got started.  I guess I should have done a bit more reading.

Anyway, to answer your question, I had turned on root access in /etc/ssh/sshd_config and it appears that it wasn't starting becuase I hadn't added the correct line in  /etc/rc.conf -- as you pointed out.  I think the messages in the log were related to me attempts to manually get things going.  However, when I did start "/etc/rc.d/sshd start" I did make sure that sshd was not running from previous attempts.  It seems odd that port 22 was in use.  Well, I probably messed up and I will re-attempt with a fresh start when I get home.

Thanks and I will update you.
Kev

Offline

#4 2003-07-23 12:11:27

iKevin
Member
From: Ann Arbor, MI
Registered: 2003-07-20
Posts: 130

Re: Problem starting sshd

Hi Bobonov,

Again, thanks for your note.  Pretty much everything is working now and it all based on getting the deamon to start properly. The error must have been related to my attempts to get things working wherein I must have left sshd running.

Thanks again and I have read more about how arch is setup  wink
Kevin

Offline

Board footer

Powered by FluxBB