Strona 1 z 2
restart sshd kończy się niepowodzeniem
: 19 marca 2010, 19:46
autor: Bastian
Mam problem z restartem sshd:
Kod: Zaznacz cały
d104747:/usr/bin# /etc/init.d/ssh restart
sshd: OpenSSH_2.9p2 on i686-pc-linux-gnu
Unknown option -t
Próbowałem też tak i oto efekt:
Kod: Zaznacz cały
d104747:/usr/bin# /etc/init.d/ssh stop&&/etc/init.d/ssh start
Stopping OpenBSD Secure Shell server: sshd.
Starting OpenBSD Secure Shell server: sshd : OpenSSH_2.9p2 on i686-pc-linux-gnu
: FATAL: Creating listener failed: port 22 probably already in use!
Jednak to rozwiązałem z pomocą
tego, czyli:
Kod: Zaznacz cały
d104747:/var/run# /etc/init.d/ssh stop&&/etc/init.d/ssh start
Stopping OpenBSD Secure Shell server: sshd.
Starting OpenBSD Secure Shell server: sshd : OpenSSH_2.9p2 on i686-pc-linux-gnu
.
d104747:/var/run#
Jednak jeśli chciałbym wykonać ponownie restart, problem wraca. Proszę o pomoc.
: 19 marca 2010, 20:22
autor: lessmian2
Pokaż plik /etc/default/ssh
: 21 marca 2010, 09:08
autor: Bastian
Kod: Zaznacz cały
grzempa@d104747:~$ cat /etc/default/ssh
# Default settings for openssh-server. This file is sourced by /bin/sh from
# /etc/init.d/ssh.
# Options to pass to sshd
SSHD_OPTS=
Jak widać, serwer nie ma wpisanych dodatkowych opcji, zatem o co może chodzić? Borykam się jeszcze z
TYM. Może ma to związek?
: 21 marca 2010, 12:59
autor: tremor
Po nieudanym restarcie pokaż co daje
Możesz też spróbować przeinstalować openssh.
: 22 marca 2010, 22:37
autor: Bastian
Kod: Zaznacz cały
grzempa@d104747:~$ sudo /etc/init.d/ssh restart
Password:
sshd: OpenSSH_2.9p2 on i686-pc-linux-gnu
Unknown option -t
Kod: Zaznacz cały
ja@d104747:~$ netstat -tnl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5678 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:37681 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:828 0.0.0.0:* LISTEN
ok, przeinstalowalem openssh-server:
I teraz mam:
Kod: Zaznacz cały
sudo /etc/init.d/ssh restart
Restarting OpenBSD Secure Shell server: sshdstart-stop-daemon: warning: failed to kill 3153: No such process
Kod: Zaznacz cały
grzempa@d104747:/home$ netstat -tnl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5678 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:37681 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:828 0.0.0.0:* LISTEN
Gdzie jest ten port 22 ?
: 23 marca 2010, 21:44
autor: tremor
A ssh chodzi? Może daj (jako root):
A jak go nie będzie na liście także:
: 24 marca 2010, 12:51
autor: Bastian
No chodzi, inaczej nie mogłbym działać zdalnie (to serwer w serwerowni, pracuje tylko zdalnie). Porblem w tym, że nie moge wyłączyć poprzez skrypt sshd. Nawet nie moge wyłączyć usługi:
Kod: Zaznacz cały
user@d104747:~$ ps -A |grep sshd
Unknown HZ value! (192) Assume 100.
30047 ? 00:00:02 sshd
18332 ? 00:00:00 sshd
19697 ? 00:00:00 sshd
grzempa@d104747:~$ sudo /etc/init.d/ssh stop
Stopping OpenBSD Secure Shell server: sshdstart-stop-daemon: warning: failed to kill 3153: No such process
.
grzempa@d104747:~$ ps -A |grep sshd
Unknown HZ value! (192) Assume 100.
30047 ? 00:00:02 sshd
18332 ? 00:00:00 sshd
19697 ? 00:00:00 sshd
Cały czas te same procesy chodzą.
Dodatkowo to o co prosisz:
Kod: Zaznacz cały
user@d104747:~$ sudo ps -A |grep sshd
Password:
Unknown HZ value! (192) Assume 100.
30047 ? 00:00:02 sshd
18332 ? 00:00:00 sshd
19697 ? 00:00:00 sshd
23498 ? 00:00:00 sshd
user@d104747:~$ sudo netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 3039/mysqld
tcp 0 0 0.0.0.0:5678 0.0.0.0:* LISTEN 3243/(squid)
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2514/portmap
tcp 0 0 0.0.0.0:37681 0.0.0.0:* LISTEN 3205/rpc.statd
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN 3124/inetd
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 17805/postmaster
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 17937/exim4
tcp 0 0 127.0.0.1:828 0.0.0.0:* LISTEN 3196/famd
Kod: Zaznacz cały
user@d104747:~$ sudo ps auxw |grep ssh
Unknown HZ value! (192) Assume 100.
grzempa 23692 0.0 0.0 3724 676 pts/2 S 12:50 0:00 grep ssh
: 24 marca 2010, 13:54
autor: mariaczi
Jeśli możesz się zalogować, co oznacza, że działa a nie widać go aby nasłuchiwał na portach to obstawiam, że jest uruchamiany z inetd a nie jako standalone serwis.
: 24 marca 2010, 16:45
autor: tremor
Co to w ogóle za Debian, potato? Openssh w wersji 2.9...
Niestety netstat nie poniał przełącznika -p (u mnie wyświetla nazwy procesów odpowiedzialnych za otarcie poszczególnych portów). W inetd nadzieja (niegdyś był dość popularny).
: 24 marca 2010, 16:47
autor: Bastian
Jeśli możesz się zalogować, co oznacza, że działa a nie widać go aby nasłuchiwał na portach to obstawiam, że jest uruchamiany z inetd a nie jako standalone serwis.
Kod: Zaznacz cały
user@d104747:~$ sudo cat /etc/inetd.conf
Password:
# /etc/inetd.conf: see inetd(8) for further informations.
#
# Internet server configuration database
#
#
# Lines starting with "#:LABEL:" or "#<off>#" should not
# be changed unless you know what you are doing!
#
# If you want to disable an entry so it isn't touched during
# package updates just comment it out with a single '#' character.
#
# Packages should modify this file by using update-inetd(8)
#
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
#
#:INTERNAL: Internal services
#echo stream tcp nowait root internal
#echo dgram udp wait root internal
#chargen stream tcp nowait root internal
#chargen dgram udp wait root internal
#discard stream tcp nowait root internal
#discard dgram udp wait root internal
#daytime stream tcp nowait root internal
#daytime dgram udp wait root internal
#time stream tcp nowait root internal
#time dgram udp wait root internal
#:STANDARD: These are standard services.
#<off># ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/proftpd
#:BSD: Shell, login, exec and talk are BSD protocols.
#:MAIL: Mail, news and uucp services.
#:INFO: Info services
ident stream tcp wait identd /usr/sbin/identd identd
#:BOOT: Tftp service is provided primarily for booting. Most sites
# run this only on machines acting as "boot servers."
#:RPC: RPC based services
#:HAM-RADIO: amateur-radio services
#:OTHER: Other services
user@d104747:~$
Chyba jednak nie..
Co to w ogóle za Debian, potato? Openssh w wersji 2.9...
Niestety netstat nie poniał przełącznika -p (u mnie wyświetla nazwy procesów odpowiedzialnych za otarcie poszczególnych portów). W inetd nadzieja (niegdyś był dość popularny).
Kod: Zaznacz cały
user@d104747:~$ cat /etc/debian_version
4.0
Kod: Zaznacz cały
user@d104747:~$ sudo cat /proc/version
Linux version 2.6.18-6-686 (Debian 2.6.18.dfsg.1-18etch1) (waldi@debian.org) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP Sun Feb 10 22:11:31 UTC 2008
Taka niestety wersje odziedziczyłem po porzedniku