#1 Le 25/10/2013, à 17:02
- DonutMan75
Service ssh invisible ? Oo'
Bonjour à tous,
voilà j'essaie d'approfondir mes connaissances sur les services linux et, par conséquent, sur les run level.
Sur ma machine, j'ai un service ssh qui est lancé automatiquement au démarrage.
En effet :
$ service ssh status
ssh start/running, process 25792
Si j'ai bien compris, il a du être lancé à un moment ou à un autre par init.d ?
Or si je cherche, je ne le trouve nulle part :
$ ll /etc/rc* | grep -i ssh
$
Ne suis-je pas sensé le voir, soit dans /etc/rcS.d/ ou danS /etc/rc2.d/ ?
$ runlevel
N 2
Je suis sous Ubuntu 12.04.3 LTS (GNU/Linux 3.2.0-34-generic-pae i686)
Merci d'avance
Donut
Hors ligne
#2 Le 25/10/2013, à 17:25
- pingouinux
Re : Service ssh invisible ? Oo'
Bonjour,
Tu peux déjà essayer ceci
find /etc/rc* /etc/init* -name ssh\*
mais quelqu'un d'autre aura peut-être une réponse plus pertinente.
Hors ligne
#3 Le 25/10/2013, à 17:41
- DonutMan75
Re : Service ssh invisible ? Oo'
Effectivement, j'ai trouvé quelque chose :
$ find /etc/rc* /etc/init* -name ssh
/etc/init.d/ssh
$ more /etc/init.d/ssh
#! /bin/sh
### BEGIN INIT INFO
# Provides: sshd
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: OpenBSD Secure Shell server
### END INIT INFO
[...]
# Default-Start: 2 3 4 5, signifie que le service ssh est lancé avec les runlevels 2 (ie, celui par défaut), 3, 4 et 5.
Je ne comprends pas pourquoi je ne le trouve pas dans /etc/rc2.d/ :
$ ll /etc/rc2.d/
total 20
drwxr-xr-x 2 root root 4096 oct. 24 20:51 ./
drwxr-xr-x 122 root root 12288 oct. 24 20:57 ../
-rw-r--r-- 1 root root 677 juil. 26 2012 README
lrwxrwxrwx 1 root root 17 oct. 17 2012 S20postfix -> ../init.d/postfix*
lrwxrwxrwx 1 root root 13 août 20 2012 S23ntp -> ../init.d/ntp*
lrwxrwxrwx 1 root root 20 août 20 2012 S31atieventsd -> ../init.d/atieventsd*
lrwxrwxrwx 1 root root 15 août 20 2012 S50rsync -> ../init.d/rsync*
lrwxrwxrwx 1 root root 19 août 20 2012 S70dns-clean -> ../init.d/dns-clean*
lrwxrwxrwx 1 root root 18 août 20 2012 S70pppd-dns -> ../init.d/pppd-dns*
lrwxrwxrwx 1 root root 14 oct. 24 20:51 S75sudo -> ../init.d/sudo*
lrwxrwxrwx 1 root root 21 août 20 2012 S99grub-common -> ../init.d/grub-common*
lrwxrwxrwx 1 root root 18 août 20 2012 S99ondemand -> ../init.d/ondemand*
lrwxrwxrwx 1 root root 18 août 20 2012 S99rc.local -> ../init.d/rc.local*
Tout cela est bien mystérieux pour moi....
En tout cas, merci pour ta réponse
Donut
Hors ligne
#4 Le 25/10/2013, à 18:19
- tiramiseb
Re : Service ssh invisible ? Oo'
# Default-Start: 2 3 4 5, signifie que le service ssh est lancé avec les runlevels 2 (ie, celui par défaut), 3, 4 et 5.
Ça signifie que les valeurs par défaut sont de se lancer en 2, 3, 4 et 5, si ce script était utilisé.
Je pense tout simplement que SSH est lancé par upstart, grâce au fichier /etc/init/ssh.conf que tu n'as pas en résultat de ta commande, étant donné que tu n'as pas respecté la syntaxe que pingouinux proposait ( « \* » à la fin de la ligne, que tu n'as pas mis).
Sébastien Maccagnoni - https://www.maccagnoni.eu - https://www.domotego.com
Hors ligne