- Fedora-Fr
- À propos de Fedora-Fr
- Historique
- Statistiques
- Télécharger
- Obtenir Fedora
- Toutes les méthodes de téléchargement
- Support
- Aide sur IRC
- Forums
- Documentation
- Sous-projets
- Plateforme de blog
Dernière news : Fedora Linux 36 est disponible !
Pages : 1
Le service est bien activé par [systemctl enable sshd.service]
il l'était peut-être par défault
# service sshd reload
Redirecting to /bin/systemctl reload sshd.service
Job for sshd.service failed. See 'systemctl status sshd.service' and 'journalctl -xn' for details.
# systemctl status sshd.service
sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled)
Active: inactive (dead)
oct. 20 11:25:17 localhost.localdomain systemd[1]: Unit sshd.service cannot be reloaded because it is inactive.
oct. 20 11:27:02 localhost.localdomain systemd[1]: Unit sshd.service cannot be reloaded because it is inactive.
oct. 20 11:33:52 localhost.localdomain systemd[1]: Unit sshd.service cannot be reloaded because it is inactive.
oct. 20 11:39:45 localhost.localdomain systemd[1]: Unit sshd.service cannot be reloaded because it is inactive.
oct. 20 11:40:14 localhost.localdomain systemd[1]: Unit sshd.service cannot be reloaded because it is inactive.
oct. 20 11:43:50 localhost.localdomain systemd[1]: Unit sshd.service cannot be reloaded because it is inactive.
oct. 20 11:49:00 localhost.localdomain systemd[1]: Unit sshd.service cannot be reloaded because it is inactive.
Je ne sais pas s'il n'y a pas d'erreurs dans ce fichier car j'ai décommenté:
# $OpenBSD: sshd_config,v 1.90 2013/05/16 04:09:14 dtucker Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 22 ; 443
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
# The default requires explicit activation of protocol 1
Protocol 2
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 1h
ServerKeyBits 1024
# Ciphers and keying
#RekeyLimit default none
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO
# Authentication:
LoginGraceTime 2m
PermitRootLogin no
StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
RSAAuthentication yes
PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
#KerberosUseKuserok yes
# GSSAPI options
#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials no
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
# WARNING: 'UsePAM no' is not supported in Fedora and may cause several
# problems.
#UsePAM no
UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation sandbox # Default for new installations.
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server
# Uncomment this if you want to use .local domain
#Host *.local
# CheckHostIP no
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server
Dernière modification par anche (20/10/2014 12:07:36)
F23
Hors ligne
systemctl enable sshd.service
C'est pas parce que c'est difficile qu'on n'ose pas,
c'est parce qu'on ose pas que c'est difficile !
Hors ligne
Hors ligne
De mémoire et sauf erreur j'ai touché à ces lignes dans sshd.config
Port 22 ; 443
Protocol 2
KeyRegenerationInterval 1h
ServerKeyBits 1024
PermitRootLogin no
**********************************
[fil@localhost ~]$ su
Mot de passe :
[root@localhost fil]# systemctl enable sshd.service
[root@localhost fil]# systemctl status sshd.service
sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled)
Active: inactive (dead)
oct. 20 11:25:17 localhost.localdomain systemd[1]: Unit sshd.service cannot b...
oct. 20 11:27:02 localhost.localdomain systemd[1]: Unit sshd.service cannot b...
oct. 20 11:33:52 localhost.localdomain systemd[1]: Unit sshd.service cannot b...
oct. 20 11:39:45 localhost.localdomain systemd[1]: Unit sshd.service cannot b...
oct. 20 11:40:14 localhost.localdomain systemd[1]: Unit sshd.service cannot b...
oct. 20 11:43:50 localhost.localdomain systemd[1]: Unit sshd.service cannot b...
oct. 20 11:49:00 localhost.localdomain systemd[1]: Unit sshd.service cannot b...
oct. 20 13:36:27 localhost.localdomain systemd[1]: Unit sshd.service cannot b...
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost fil]#
*********************************************
Si je fais reload ça retourne une erreur mais le service fonctionne??
# service sshd reload
Redirecting to /bin/systemctl reload sshd.service
Job for sshd.service failed. See 'systemctl status sshd.service' and 'journalctl -xn' for details.
journalctl -xn retourne celà:
Unit sshd.service cannot be reloaded because it is inactive.
Dernière modification par anche (20/10/2014 13:49:42)
F23
Hors ligne
Hors ligne
Nginx
EDIT en vérifiant j'ai Apache sur localhost
(alors il doit être installé par défaut?)
Dernière modification par anche (20/10/2014 14:39:58)
F23
Hors ligne
journalctl -xn retourne celà:
Unit sshd.service cannot be reloaded because it is inactive.
je t'ai donné une commande. Tu n'es pas intéressé ?
C'est pas parce que c'est difficile qu'on n'ose pas,
c'est parce qu'on ose pas que c'est difficile !
Hors ligne
Hors ligne
anche a écrit :journalctl -xn retourne celà:
Unit sshd.service cannot be reloaded because it is inactive.je t'ai donné une commande. Tu n'es pas intéressé ?
Il l'a faite mais tu as oublié de donner cette commande :
systemctl start sshd
:)
Sinon, ne mets pas de point virgule, je ne pense pas que ça marche. Reste avec un seul port pour le moment, on verra ensuite.
Port 22
Dernière modification par marc2006 (20/10/2014 17:27:23)
Hors ligne
enable est là pour activer le service, après faut le démarrer.
AMD R7 5800x, MSI Pro Carbon X470, 64Go DDR4 3600 Kingston Renegarde C18 (en test), RX5700XT MSI WaterCooling OC, SSD : 1xPNY LXR8 1To + 1x970EVO 500Go + 2x500Go 860EVO, 3x1To 860EVO, HDD WD 2To + 4To Black, 3To Red, BeQuiet Purepower 1000W plat, BSGT Dark 900
AMD R7 2700x + 32Go DDR4 3200Mhz, 1xPNY LXR8 1To, 2x1To 860QVO, BMT MasterBox Q300L
AMD R5 2600, Asus mATX, 32Go DDR4 2933Mhz, 1x250GO SSD, 3x 2To RAID5 WDBlue, BCubes Chieftec + AMD A6 9500, 16Go, SSD 250Go
Hors ligne
@nouvo09, si si je suis intéressé et te remercie pour "l'aiguillage" et l'aide apporté aux nombreuses questions que je pourrais avoir afin de mieux maîtriser le système.
Je suis beaucoup plus à l'aise avec Ubuntu mais c'est Fedora qui m'intéresse.
Si openssh ne fonctionnait pas c'était bêtement à cause du port 443 que j'avais ajouté à l'arrache dans sshd.config.
Tout baigne, merci.
Pour répondre à Fedora Addict, ni Nginx ni Apache ne tourne. (sans trop insister je n'ai pas réussi à configurer Nginx comme j'avais su le faire plusieurs fois avec Mint).
F23
Hors ligne
Ça marche pas probablement parce que pour faire écouter openssh-server sur plusieurs ports, la syntaxe est la suivante :
Port 22
Port 443
Ceci dit, c'est pas franchement une bonne idée de faire écouter openssh-server sur le port par défaut du HTTPS, ou, de manière générale, sur un port connu qui n'a rien à voir. Un peu de cohérence et d'homogénéité n'a jamais fait de mal.
Fedora 26 x86_64 sur Dell Latitude E7470
Prends le temps d'écrire correctement, et on prendra le temps de répondre correctement.
Hors ligne
erreur de syntaxe oui j'avais essayé les deux façons
en fait je voulais me connecter sur un serveur distant qui fonctionne en SFTP sur le port 22 et en Webdav sur le port 443
alors sans y croire j'ai essayé de faire passer SSH sur le port 443; mais le shell est restreint rssh
dans sshd.config error: Bind to port 443 pourquoi?
# systemctl status sshd.service
sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled)
Active: active (running) since lun. 2014-10-20 18:16:01 CEST; 4h 35min ago
Main PID: 3541 (sshd)
CGroup: /system.slice/sshd.service
└─3541 /usr/sbin/sshd -D
oct. 20 18:16:24 localhost.localdomain systemd[1]: Reloaded OpenSSH server da...
oct. 20 22:50:54 localhost.localdomain systemd[1]: Reloading OpenSSH server d...
oct. 20 22:50:54 localhost.localdomain systemd[1]: Reloaded OpenSSH server da...
oct. 20 22:50:54 localhost.localdomain sshd[3541]: Received SIGHUP; restarting.
oct. 20 22:50:54 localhost.localdomain sshd[3541]: error: Bind to port 443 on...
oct. 20 22:50:54 localhost.localdomain sshd[3541]: error: Bind to port 443 on...
oct. 20 22:50:54 localhost.localdomain sshd[3541]: Server listening on 0.0.0....
oct. 20 22:50:54 localhost.localdomain sshd[3541]: Server listening on :: por...
oct. 20 22:51:00 localhost.localdomain python[6977]: SELinux is preventing /u...
***** Plugin catchall (...
oct. 20 22:51:00 localhost.localdomain python[6977]: SELinux is preventing /u...
***** Plugin catchall (...
Hint: Some lines were ellipsized, use -l to show in full.
Dernière modification par anche (20/10/2014 23:14:55)
F23
Hors ligne
Car Selinux bloque l'affectation du port différent de 22 ! Il faut dire à Selinux que le port ssh a changé, mais je ne sais pas si tu peux mettre plusieurs valeurs lol
semanage port -a -t ssh_port_t -p tcp 443
Si tu reviens au port 22, tu remplaces juste le port dans la commande. Je ne sais pas si elle prend les virgules pour pouvoir y mettre plus qu'un port.
Hors ligne
Merci
J'ouvre un sujet sur l'affectation de ports différents/SELinux
http://forums.fedora-fr.org/viewtopic.p … 55#p542155
Dernière modification par anche (21/10/2014 22:19:29)
F23
Hors ligne
Pages : 1