Bonsoir, j’au un problème de avec SSH
J’arrive à copier des fichiers de ma machine(ubuntu 9.10) vers un server debian 5.
Mais l’invers n’est pas possible
et voici le message
ssh: connect to host 10.0.99.117 port 22: Connection timed out
merci
Bonsoir, j’au un problème de avec SSH
J’arrive à copier des fichiers de ma machine(ubuntu 9.10) vers un server debian 5.
Mais l’invers n’est pas possible
et voici le message
ssh: connect to host 10.0.99.117 port 22: Connection timed out
merci
Bonjour,
As tu bien installé un serveur ssh sur ton poste (ubuntu)? Tu peux avoir seulement un client sans le serveur.
le server ssh est bien installé avec la commande
sudo aptitude install ssh
C’est pas openssh-server qu’il faut installer ?
Bonjour,
Le paquet SSH est un paquet virtuel qui installe openssh-server et openssh-client.
Arrives tu a pinguer le serveur 10.0.99.117 ? As tu un pare feu qui tourne sur 10.0.99.117 ? Que retourne cette commande sur 10.0.99.117 :
pour le ping sur le poste 10.0.99.117 passe bien
Mais je ne sais pas s’il y a un pare feu sur la 10.0.99.117
pour la commande voici le resultat
netstat -anpute
(Pas d’infos lues pour “-p”: geteuid()=1000 mais vous devez être root.)
Connexions Internet actives (serveurs et établies)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat User Inode PID/Program name
tcp 0 0 0.0.0.0:8069 0.0.0.0:* LISTEN 1001 44460 -
tcp 0 0 0.0.0.0:8070 0.0.0.0:* LISTEN 1001 44462 -
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 0 5516 -
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 1001 6878 -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 6205 -
tcp 0 0 0.0.0.0:33271 0.0.0.0:* LISTEN 0 5676 -
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 103 6271 -
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 0 6633 -
tcp 0 0 10.0.99.5:22 10.0.99.117:49789 ESTABLISHED 0 130186 -
tcp6 0 0 :::22 :::* LISTEN 0 6203 -
tcp6 0 0 ::1:5432 :::* LISTEN 103 6272 -
udp 0 0 127.0.0.1:41222 127.0.0.1:41222 ESTABLISHED 103 6280 -
udp 0 0 0.0.0.0:59679 0.0.0.0:* 0 5659 -
udp 0 0 0.0.0.0:995 0.0.0.0:* 0 5653 -
udp 0 0 0.0.0.0:111 0.0.0.0:* 0 5515
merci pour l’aide
pour la commande netstat -anpute( sur la 10.0.99.117)
NB: l’autre n’est pas pour la machine 10.0.99.117, mais plutot l’autre server 10.0.99.5
netstat -anpute
(Tous les processus ne peuvent être identifiés, les infos sur les processus
non possédés ne seront pas affichées, vous devez être root pour les voir toutes.)
Connexions Internet actives (serveurs et établies)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat User Inode PID/Program name
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 0 8249 -
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 7674 -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 6551 -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 0 15818 -
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 0 7809 -
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 112 6961 -
tcp 0 0 127.0.0.1:5433 0.0.0.0:* LISTEN 112 7260 -
tcp 0 0 0.0.0.0:22907 0.0.0.0:* LISTEN 1000 13895 2583/skype
tcp 0 0 10.0.99.35:59913 62.41.10.16:80 TIME_WAIT 0 0 -
tcp 0 0 10.0.99.35:35361 209.85.227.103:80 ESTABLISHED 1000 40547 2411/firefox
tcp 0 0 10.0.99.35:45965 209.85.227.101:80 ESTABLISHED 1000 39390 2411/firefox
tcp 0 0 10.0.99.35:45964 209.85.227.101:80 ESTABLISHED 1000 39389 2411/firefox
tcp 0 0 10.0.99.35:53832 209.85.227.103:80 ESTABLISHED 1000 39267 2411/firefox
tcp 0 0 10.0.99.35:39673 62.41.10.48:80 TIME_WAIT 0 0 -
tcp 0 0 10.0.99.35:59910 62.41.10.16:80 TIME_WAIT 0 0 -
tcp 0 0 10.0.99.35:59922 62.41.10.16:80 TIME_WAIT 0 0 -
tcp 0 0 10.0.99.35:45962 209.85.227.101:80 ESTABLISHED 1000 39329 2411/firefox
tcp 0 0 10.0.99.35:45963 209.85.227.101:80 ESTABLISHED 1000 39385 2411/firefox
tcp 0 0 10.0.99.35:45036 62.41.10.16:80 TIME_WAIT 0 0 -
tcp 0 0 10.0.99.35:45035 62.41.10.16:80 TIME_WAIT 0 0 -
tcp 0 0 10.0.99.117:49789 10.0.99.5:22 ESTABLISHED 0 29456 -
tcp 0 0 10.0.99.35:43227 98.136.112.130:5050 ESTABLISHED 1000 13697 2411/firefox
tcp 0 0 10.0.99.35:45324 98.237.51.89:3458 ESTABLISHED 1000 14961 2583/skype
tcp 0 0 10.0.99.35:35672 62.41.10.40:80 TIME_WAIT 0 0 -
tcp6 0 0 :::22 :::* LISTEN 0 6553 -
tcp6 0 0 ::1:631 :::* LISTEN 0 15817 -
udp 0 0 127.0.0.1:55592 0.0.0.0:* 1000 13763 2583/skype
udp 0 0 127.0.0.1:52267 127.0.0.1:52267 ESTABLISHED 112 7268 -
udp 0 0 0.0.0.0:68 0.0.0.0:* 0 12845 -
udp 0 0 0.0.0.0:68 0.0.0.0:* 0 4011 -
udp 0 0 0.0.0.0:46952 0.0.0.0:* 109 4931 -
udp 0 0 0.0.0.0:5353 0.0.0.0:* 109 4930 -
udp 0 0 127.0.0.1:58735 127.0.0.1:58735 ESTABLISHED 112 6979 -
udp 0 0 0.0.0.0:22907 0.0.0.0:* 1000 13896 2583/skype
udp 0 0 0.0.0.0:10000 0.0.0.0:* 0 8250 -
Salut
Peut-être qu’on peu résoudre ton problème sans intervenir niveau ssh (tu as surement un filtrage réseau)
Il te suffit de bien utiliser la commande scp.
scp [source] [destination]
Pour envoyer un fichier sur ton serveur distant :
scp /fichier/local root@server:/fichier/distant
ou l’inverse pour télécharger un fichier a partir du serveur distant :
scp root@server:/fichier/distant /fichier/local
Ça peut peut-être t’aider, tien nous au courant.
sa ne marche pas
Est-ce que tu est sur le même reseau que ton serveur (J’entend par là, pas de passage à travers un routeur) ?
ça peut être aussi un parefeu sur ta ubuntu qui bloque ssh.
Sinon nicolalala a raison. De ta machine ubuntu, tu peux envoyer ou recevoir des fichiers.
Hum + d’info stp, nous ne sommes pas devins.
Quelles sont les messages de retour? Que fais tu exactement?
Trop d’infos c’est mieux que pas assez.
je peux envoyer des fichier de ubuntu (client)vers debian (server), mais c’est du server vers le client il y a problème
Voici la commande
debian # scp fichier ssh utilisateurclient@10.0.99.117:/home/dossier
voici le message
ssh: connect to host 10.0.99.117 port 22: Connection timed out
lost connection
merci pour l’aide
Quelles sont les règles iptables des 2 cotés.
[quote=“guyferial”]je peux envoyer des fichier de ubuntu (client)vers debian (server), mais c’est du server vers le client il y a problème
Voici la commande
debian # scp fichier ssh utilisateurclient@10.0.99.117:/home/dossier
voici le message
ssh: connect to host 10.0.99.117 port 22: Connection timed out
lost connection
merci pour l’aide[/quote]
dans ta commande, ajoutes “-v”
[code]
scp -v fichier ssh utilisateurclient@10.0.99.117:/home/dossier
ça nous donnera peut-être plus d’indices.
Je pense qu’on peu faire plus simple.
Tu te met sur ta machine ubuntu et tu tape :
scp root@10.0.99.117:/emplacement/du/fichier /home/dossier
Edit :Sinon la solution sshfs peut-être intéressante pour toi qui souhaite échanger des fichiers entres tes deux machines. (voir tuto)
voici le resultat de la commande
scp -v fichier ssh sboa@10.0.99.117:/home/dossier/
Executing: program /usr/bin/ssh host 10.0.99.117, user sboa, command scp -v -d -t /home/sboa/
OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 10.0.99.117 [10.0.99.117] port 22.
debug1: connect to address 10.0.99.117 port 22: Connection timed out
ssh: connect to host 10.0.99.117 port 22: Connection timed out
lost connection
règles iptables?
voici le resultat de la commande
iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ufw-before-logging-input all – anywhere anywhere
ufw-before-input all – anywhere anywhere
ufw-after-input all – anywhere anywhere
ufw-after-logging-input all – anywhere anywhere
ufw-reject-input all – anywhere anywhere
ufw-track-input all – anywhere anywhere
Chain FORWARD (policy DROP)
target prot opt source destination
ufw-before-logging-forward all – anywhere anywhere
ufw-before-forward all – anywhere anywhere
ufw-after-forward all – anywhere anywhere
ufw-after-logging-forward all – anywhere anywhere
ufw-reject-forward all – anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ufw-before-logging-output all – anywhere anywhere
ufw-before-output all – anywhere anywhere
ufw-after-output all – anywhere anywhere
ufw-after-logging-output all – anywhere anywhere
ufw-reject-output all – anywhere anywhere
ufw-track-output all – anywhere anywhere
Chain ufw-after-forward (1 references)
target prot opt source destination
Chain ufw-after-input (1 references)
target prot opt source destination
RETURN udp – anywhere anywhere udp dpt:netbios-ns
RETURN udp – anywhere anywhere udp dpt:netbios-dgm
RETURN tcp – anywhere anywhere tcp dpt:netbios-ssn
RETURN tcp – anywhere anywhere tcp dpt:microsoft-ds
RETURN udp – anywhere anywhere udp dpt:bootps
RETURN udp – anywhere anywhere udp dpt:bootpc
RETURN all – anywhere anywhere ADDRTYPE match dst-type BROADCAST
Chain ufw-after-logging-forward (1 references)
target prot opt source destination
Chain ufw-after-logging-input (1 references)
target prot opt source destination
Chain ufw-after-logging-output (1 references)
target prot opt source destination
Chain ufw-after-output (1 references)
target prot opt source destination
Chain ufw-before-forward (1 references)
target prot opt source destination
ufw-user-forward all – anywhere anywhere
Chain ufw-before-input (1 references)
target prot opt source destination
ACCEPT all – anywhere anywhere
ACCEPT all – anywhere anywhere state RELATED,ESTABLISHED
ufw-logging-deny all – anywhere anywhere state INVALID
DROP all – anywhere anywhere state INVALID
ACCEPT icmp – anywhere anywhere icmp destination-unreachable
ACCEPT icmp – anywhere anywhere icmp source-quench
ACCEPT icmp – anywhere anywhere icmp time-exceeded
ACCEPT icmp – anywhere anywhere icmp parameter-problem
ACCEPT icmp – anywhere anywhere icmp echo-request
ACCEPT udp – anywhere anywhere udp spt:bootps dpt:bootpc
ufw-not-local all – anywhere anywhere
ACCEPT all – BASE-ADDRESS.MCAST.NET/4 anywhere
ACCEPT all – anywhere BASE-ADDRESS.MCAST.NET/4
ufw-user-input all – anywhere anywhere
Chain ufw-before-logging-forward (1 references)
target prot opt source destination
Chain ufw-before-logging-input (1 references)
target prot opt source destination
Chain ufw-before-logging-output (1 references)
target prot opt source destination
Chain ufw-before-output (1 references)
target prot opt source destination
ACCEPT all – anywhere anywhere
ACCEPT all – anywhere anywhere state RELATED,ESTABLISHED
ufw-user-output all – anywhere anywhere
Chain ufw-logging-allow (0 references)
target prot opt source destination
Chain ufw-logging-deny (2 references)
target prot opt source destination
Chain ufw-not-local (1 references)
target prot opt source destination
RETURN all – anywhere anywhere ADDRTYPE match dst-type LOCAL
RETURN all – anywhere anywhere ADDRTYPE match dst-type MULTICAST
RETURN all – anywhere anywhere ADDRTYPE match dst-type BROADCAST
ufw-logging-deny all – anywhere anywhere limit: avg 3/min burst 10
DROP all – anywhere anywhere
Chain ufw-reject-forward (1 references)
target prot opt source destination
Chain ufw-reject-input (1 references)
target prot opt source destination
Chain ufw-reject-output (1 references)
target prot opt source destination
Chain ufw-track-input (1 references)
target prot opt source destination
Chain ufw-track-output (1 references)
target prot opt source destination
ACCEPT tcp – anywhere anywhere state NEW
ACCEPT udp – anywhere anywhere state NEW
Chain ufw-user-forward (1 references)
target prot opt source destination
RETURN all – anywhere anywhere
Chain ufw-user-input (1 references)
target prot opt source destination
ACCEPT tcp – anywhere anywhere tcp dpt:5900
ACCEPT udp – anywhere anywhere udp dpt:5900
RETURN all – anywhere anywhere
Chain ufw-user-logging-forward (0 references)
target prot opt source destination
Chain ufw-user-logging-input (0 references)
target prot opt source destination
Chain ufw-user-logging-output (0 references)
target prot opt source destination
Chain ufw-user-output (1 references)
target prot opt source destination
RETURN all – anywhere anywhere
[quote=“nicolalala”]Je pense qu’on peu faire plus simple.
Tu te met sur ta machine ubuntu et tu tape :
scp root@10.0.99.117:/emplacement/du/fichier /home/dossier
Edit :Sinon la solution sshfs peut-être intéressante pour toi qui souhaite échanger des fichiers entres tes deux machines. (voir tuto)[/quote]
Tu veux pas essayer? juste pour me dire si je me plante totalement…
la solution ne marche pas