Bonsoir à tous,
Comme vous pouvez le supposer en voyant le titre du topic, j'ai un problème de time out en utilisant le port 22 pour faire une connexion SSH. Cela dit j'ai consulté une grande partie des posts à ce sujet sur différents forums dont celui-là sans trouver de solutions à mon problème.
J'essaye d'établir une connexion ssh pour prendre le contrôle d'un Asus Eeepc appartement à ma petite amie qui est sous Ubuntu. Ainsi OpenSSH est bien installé et lancé sur les deux, et le test de connexion en localhost (ssh user@localhost) fonctionne sur les deux pc.
J'ai redirigé le port 22 vers son IP Locale en lui attribuant ainsi une IP locale fixe, puis j'ai fait de même sur mon pc. En somme je fais tout en parallèle, pour qu'elle puisse aussi se connecter sur mon pc.
Pourtant lorsque de ma machine je tente une connexion, j'obtiens :
ssh: connect to host xxx port 22: Connection timed out
Je me suis penché du côté des parefeu. De mon côté, le service SSH est bien accepté (en tcp uniquement, j'ai dont ajouté une règle pour l'udp) au port 22 et sur son pc il n'a pas encore de parefeu, ainsi iptables -L lui renvoie:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
A noter que ça ne change rien si je laisse mon parefeu activé ou non.
J'ai également tenté un telnet *ip* *port 22* mais qui renvoie:
telnet: connect to address xxx: Connection timed out
Alors qu'un telnet de chez elle vers chez moi fonctionne correctement.
au niveau du ssh_config je ne sais pas trop si je dois le modifier ou non. Dans le doute je vous donne le mien:
# $OpenBSD: ssh_config,v 1.26 2010/01/11 01:39:46 dtucker Exp $
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
# Host *
# ForwardAgent no
# ForwardX11 no
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# GSSAPITrustDNS no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
Host *
GSSAPIAuthentication yes
# If this option is set to yes then remote X11 clients will have full access
# to the original X11 display. As virtually no X11 client supports the untrusted
# mode correctly we set this to yes.
ForwardX11Trusted yes
# Send locale-related environment variables
SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
SendEnv LC_IDENTIFICATION LC_ALL LANGUAGE
SendEnv XMODIFIERS
Et le sien:
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# GSSAPITrustDNS no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
J'ai ensuite été dans son /etc/hosts pour indiquer que son adresse IP pointait vers son nom d'utilisateur mais j'ai toujours le time out.
Je suis donc bloqué là.
Merci d'avance pour votre aide ! 😃
EDIT: Je parle ici de connexion hors réseau local.
J'ai envoyé un fichiervia scp fichier user@sonip qui a fonctionné mais naturellement quand je veux envoyer un fichier de chez elle vers chez moi en scp j'ai toujours un time out.
EDIT2: En demandant à une personne tierce de tester; il semblerait que le problème vienne de moi. Personnellement je ne vois pas ce que je peux faire.