[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ssh et redirection par firewall



Bonjour

Je suis toujours dans mes tests avec iptables. Cette fois, je joue avec le ssh. J'ai un problème du au ssh. En effet, je peux faire un ssh sur 2 ports différents de mon serveur/routeur qui renvoient chaqu'en sur un serveur ssh différent. Le problème est que les clef des deux serveurs sont différentes. Puis-je simplement copier les clefs d'un serveur sur l'autre ?


Config iptable :
      # transférer l'appel ssh vers le PC 192.168.1.2
$ipt -t nat -A PREROUTING -j DNAT -i $NET -p TCP --dport 22 --to-destination 192.168.1.2 # redirige l'appel du port 2200 vers le port 22 du PC 192.168.1.1 (c'est à dire celui-là)
       $ipt -A INPUT -p tcp --dport 2200 -j ACCEPT
$ipt -t nat -A PREROUTING -j DNAT -i $NET -p TCP --dport 2222 --to-destination 192.168.1.1:22


Message de ssh pour une connexion sur un port après avoir configurer l'autre :

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
6b:bd:38:47:fd:47:b2:a0:35:4e:2f:4b:0d:8c:f3:96.
Please contact your system administrator.
Add correct host key in /home/geiibsiaud/.ssh/known_hosts to get rid of this message.
Offending key in /home/geiibsiaud/.ssh/known_hosts:3
Password authentication is disabled to avoid man-in-the-middle attacks.
X11 forwarding is disabled to avoid man-in-the-middle attacks.
Permission denied (publickey,password,keyboard-interactive).

--
Amicalement vOOotre              Troumad Alias Bernard SIAUD
mon site : http://troumad.free.fr : AD&D maths WEB sectes
Pour la liberté http://lea-linux.org http://www.eurolinux.org/index.fr.html
N'envoyez que des documents avec des formats ouverts, comme http://fr.openoffice.org



Reply to: