Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] sshd: can't restart
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jonnevers
Veteran
Veteran


Joined: 02 Jan 2003
Posts: 1594
Location: Gentoo64 land

PostPosted: Mon Jan 28, 2008 5:17 pm    Post subject: [SOLVED] sshd: can't restart Reply with quote

I just updated to net-misc/openssh-4.7_p1-r3 and I cannot restart the service:
Code:
host root # /etc/init.d/sshd restart
 * Stopping sshd ...                                                                                                             [ !! ]
host root #

what about manually?
Code:
host root # start-stop-daemon --stop --exec "/usr/sbin/sshd" --pidfile "/var/run/sshd.pid"
No /usr/sbin/sshd found running; none killed.

system status?
Code:
host root # cat /var/run/sshd.pid
11995
host root # file /usr/sbin/sshd
/usr/sbin/sshd: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), stripped
host root # ls -lh /usr/sbin/sshd
-rwxr-xr-x 1 root root 352K Jan 28 09:29 /usr/sbin/sshd
host root # ps -ef | grep -i ssh
root      9610 11995  0 12:07 ?        00:00:00 sshd: user [priv]
user      9612  9610  0 12:07 ?        00:00:00 sshd: user@pts/2
root      9981  9631  0 12:16 pts/2    00:00:00 grep --colour=auto -i ssh
root     11995     1  0  2007 ?        00:00:04 /usr/sbin/sshd
root     17443 11995  0 00:00 ?        00:00:00 sshd: user [priv]
user     17445 17443  0 00:00 ?        00:00:03 sshd: user@pts/1
host root #

everything looks ok to me? any suggestions besides manually kill the daemon (since I am currently remote)?


Last edited by jonnevers on Mon Jan 28, 2008 9:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Mon Jan 28, 2008 5:30 pm    Post subject: Reply with quote

Kill the daemon. Leave the remote connections alone and you'll be fine. I generally log in from a second remote session to be sure.
Back to top
View user's profile Send private message
StarDragon
Guru
Guru


Joined: 19 Jun 2005
Posts: 390
Location: tEXas

PostPosted: Mon Jan 28, 2008 6:42 pm    Post subject: Reply with quote

What about
Code:
cat /var/log/messages
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Mon Jan 28, 2008 7:55 pm    Post subject: Reply with quote

after killing the sshd process, you might need to zap the service to restart it
Code:

/etc/init.d/sshd zap
/etc/init.d/sshd start

_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
jonnevers
Veteran
Veteran


Joined: 02 Jan 2003
Posts: 1594
Location: Gentoo64 land

PostPosted: Mon Jan 28, 2008 8:03 pm    Post subject: Reply with quote

coolsnowmen wrote:
after killing the sshd process, you might need to zap the service to restart it

I know how to work with init scripts, I was just concerned with why sshd wasn't stopping properly when everything appears to be proper. The main reason for concern is because the last time the sshd init script was unable to bring down sshd was because the host was compromised and a hacked sshd was running on a high port.

All of that has been cleaned up and no unknown ports are open and all processes have been accounted for.

So i sent the primary sshd a kill -s TERM but unfortunately i then ran 'stop' on the init script which did kill all connected sessions and since i -s TERM'd the daemon, I'm locked out for the time being :P

I will check /var/log/messages when I'm local to the machine.
Back to top
View user's profile Send private message
jonnevers
Veteran
Veteran


Joined: 02 Jan 2003
Posts: 1594
Location: Gentoo64 land

PostPosted: Mon Jan 28, 2008 9:55 pm    Post subject: Reply with quote

after getting back locally to the machine, sshd is running again and can be restarted properly via the init script. still not sure what the issue was.

I have no /var/log/messages but /var/log/everything/current didn't show anything to note unfortunately.
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5947

PostPosted: Sat Feb 16, 2008 8:02 am    Post subject: Reply with quote

i got the same problem... been noticing it now for a while... i used to be able to restart sshd whilst being logged in but now that doesn't work... i really don't want to log onto these machines locally because it royally messes up my utmp.
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum