Outils pour utilisateurs

Outils du site


informatique:reseau:ssh

Ceci est une ancienne révision du document !


Secure SHell

Configuration

Dans /etc/ssh/sshd_config tu change la ligne

PermitRootLogin Yes 
en 
PermitRootLogin No

Et si tu veux autoriser l'accès ssh en root uniquement avec clé ssh tu mets :

PermitRootLogin without-password

Mais bon ça marche pas …

Voici une config qui fontionne :

UsePAM no
RSAAuthentication yes
PermitRootLogin without-password
PermitEmptyPasswords no
PasswordAuthentication no 

et une autre :

UsePAM no
Subsystem	sftp	/usr/libexec/openssh/sftp-server
IgnoreRhosts yes
IgnoreUserKnownHosts no
PrintMotd yes
StrictModes yes
RSAAuthentication yes
PermitRootLogin no
PermitEmptyPasswords no
PasswordAuthentication no

Clients

ClusterSSH

http://sourceforge.net/apps/mediawiki/clusterssh/

ClusterSSH is a tool for making the same change on multiple servers at the same time. The 'cssh' command opens an administration console and an xterm to all specified hosts. Any text typed into the administration console is replicated to all windows. All windows may also be typed into directly.

This tool is intended for (but not limited to) cluster administration where the same configuration or commands must be run on each node within the cluster. Performing these commands all at once via this tool ensures all nodes are kept in sync.

Clients pour Windows

Linux Keychain Guide

Tips

Logs

comment demander gentilement a sshd de logger tout ce qui se passe connexion/deconnexions dans un fichier /var/log/sshd.log ?

voir /etc/syslog.conf

# ATTENTION : local5 est utilisé notamment par sshd
local5.info /var/log/sshd

Email automatique lors de la connexion

Email automatique pour toute connexion ssh:

créer le fichier /etc/ssh/sshrc avec:

email="$USER@"`hostname`
ldate=`date "+%A %e %B %Y à %Hh%M %Z"`
echo -e "Bonjour,\n\nUne session SSH version $SHLVL à été ouverte\n\ncompte: $email\n\ndate: $ldate\n\nconnexion: $SSH_CONNECTION." | mail -s "connexion ssh" monemail@mondomaine.com

Blacklister les Ips indésirables

Avec le script ssh-blacklist, voir ssh_scanning.

Chroot Jail

informatique/reseau/ssh.1337379536.txt.gz · Dernière modification : 27/02/2013 11:04 (modification externe)

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki