110.3 SSH
image/svg+xml
110.3 SSH
2012-08-29
Éric Deschamps - http://www.formation-lpi.com
Éric Deschamps - http://www.formation-lpi.com
Éric Deschamps - http://www.formation-lpi.com
http://www.formation-lpi.com
fr-FR
certification linux LPIC-1
examen LPI 102
110.3
SSH
Mind Map
topogramme
carte heuristique
Mind Map du cours sur SSH pour la préparation de l'examen LPI 102 (certification LPIC-1). Il présente les commandes ssh, scp et sftp, la gestion des clés utilisateurs et machines, la configuration du serveur ssh et des clients, ainsi que la gestion des tunnels et l'utilisation de ssh-agent pour conserver l'authentification.
DIFFÉRENT /!\
ssh-copy-id
110.3
SSH
(3/2)
CONFIGURATION
UTILISATEUR
~/.ssh/config
Host machine
User util
Port 1122
/etc/nologin
CONNEXIONS UTILISATEURS
ROOT OK
/etc/ssh/
ssh_config
sshd_config
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 768
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin no
AllowUsers riri toto
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
AVANCÉ
ssh-agent
ssh-add -d
SUPPRIME L'AUTHENTIFICATION
ssh-add
ENREGISTRE L'AUTHENTIFICATION
eval `ssh-agent`
EXPORTE VALEUR DES
VARIABLES D'ENVIRONNEMENT
CONSERVE L'AUTHENTIFICATION
TUNNELS
ssh
-N
UNIQUEMENT REDIRECTION DE PORT
N'EXÉCUTE PAS DE COMMANDE
-f
TÂCHE DE FOND
-R
ssh -R 1080:formation-lpi.com:80
util@machine
REMOTE
SE CONNECTE À PORT LOCAL
OUVRE PORT DISTANT
-L
ssh -L 1025:localhost:25 util@machine
LOCAL
SE CONNECTE À PORT DISTANT
OUVRE PORT LOCAL
Port Forwarding
FONCTIONNEMENT
X11 Forwarding
ssh
-X
login@hote commande
X11Forwarding yes
Voir Aussi
ssh-agent
ksshaskpass
ssh-askpass-gnome
Linux France
Configurer et utiliser SSH
man
ssh-add
ssh-agent
ssh-keygen
sftp
scp
ssh
AUTHENTIFICATION
UTILISATEUR
CLÉ
sshd_config
PubkeyAuthentication
~/.ssh/authorized_keys
ssh-copy-id
EX.
-i fichier.pub
ssh-keygen
EX.
ssh-keygen -t dsa
-p
change le mot de passe
-t
dsa | rsa
~/.ssh/
id_dsa.pub
id_dsa
(privée)
MOT DE PASSE
MACHINE
~/.ssh/known_hosts
EMPREINTES
/etc/ssh_known_hosts
CLÉS
/etc/ssh/
PUBLIQUE
ssh_host_dsa_key.pub
ssh_host_rsa_key.pub
PRIVÉE
ssh_host_dsa_key
ssh_host_rsa_key
COMMANDES
sftp
COMMANDES
put, get, etc.
sftp utilisateur@exemple.com
scp
EX.
scp eric@lenny:'"/home/eric/fichier a esp"' \
/tmp
scp -r repertoire util@hote:~/
scp -P 222 fichier util@hote:~/
OPTIONS
-r
récursif
-P
port
scp util@hote:path/fichier
util2@hote2:path/fichier2
ssh
EX.
ssh -p 1022 utilisateur@hote
ssh utilisateur@hote ls
ssh utilisateur@hote
OPTIONS
-p
port
ssh [options] hote [commande]
DÉFINITION
Libwrap
TCP Wrappers
/etc/hosts.
deny
allow
PROTOCOLE
VERSIONS
V2
Plus sécurisée !
V1 à éviter !
TCP 22
CLIENTS
putty
ssh
sshd
REMPLACE
RSH
Telnet
Rlogin
ssh -L port-local:adresse:port
serveur-ssh
ssh -N -f -R port-distant:adresse:port
serveur-ssh
ssh-copy-id util@machine
(publique)
ssh-copy-id -i id_dsa.pub util@machine
V 3.5.1 - 29/08/2012 Auteur : Éric Deschampshttp://www.formation-lpi.com