Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#26 Le 08/12/2014, à 17:54

JujuLand

Re : [Résolu] Connexion ssh : needpriv 0

Bon, il ne me reste plus qu'à trouver ce qui coince coté Livebox Pro v3 ...

Mais c'est dèjà une bonne chose d'avoir validé une config.

Merci
A+


Xubuntu 16.04 > Dell DM061 (2007) + Dell Inspiron 531 (2008)
Xubuntu 16.04 > Asus X51L (2009) + MSI GX723 (2009)
Xubuntu 22.04 > HP 15BA048NF (2018)

Hors ligne

#27 Le 11/12/2014, à 12:28

JujuLand

Re : [Résolu] Connexion ssh : needpriv 0

Bon, j'ai fini par faire avancer le bourrin, mais il me reste quelques questions:

Voici tout d'abord les règles sur la box qui permettent le passage:

Parefeu:
Service               SSH_111
Protocole             TCP
IP Source             192.168.1.0         (adresse du routeur de la box)
Masque source         255.255.255.0   
Port source           22111
Port destination      Tous
Masque destination    Tous
IP destination        Tous

NAT/PAT

NAT/PAT
Service              SSH_111
Protocole            TCP
Port interne         22111
Port externe         Tous
IP serveur           192.168.1.111

Mais tout ceci n'était pas suffisant.

1) Il m'a fallu désactiver le parefeu coté machine.
D'après ce que j'ai vu, ce n'est pas la bonne solution, il vaut mieux ajouter explicitement les ports à autoriser.
Faut que je vois çà ...

2), et çà m'inquiète un peu, il m'a fallu activer le DMZ sur la box.
Je ne sais pas trop à quoi sert ce truc, et de plus, sur la livebox v1, ne n'est pas nécessaire.

Edit
Ca marche sur le première machine, mais pas sur la seconde.
Sur la deuxième machine, j'ai 'connection refused'.
Je n'arrive pas à activer le DMZ pour cette machine ?
Les deux machines ont le même nom (coté ubuntu).
Serait-ce la raison ?

Sur la première machine, le iptables -L me donne:

jacques@gadel-pc2:~$ sudo ufw disable
Le pare-feu est arrêté et désactivé lors du démarrage du système
jacques@gadel-pc2:~$ sudo iptables -L
[sudo] password for jacques: 
Chain INPUT (policy ACCEPT)
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 ACCEPT)
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            
ufw-track-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         

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         

Chain ufw-before-input (1 references)
target     prot opt source               destination         

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         

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-forward (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         

sur la première, c'est moins bavard, mais ça ne passe pas ...



Merci
A+

Dernière modification par JujuLand (Le 11/12/2014, à 12:40)


Xubuntu 16.04 > Dell DM061 (2007) + Dell Inspiron 531 (2008)
Xubuntu 16.04 > Asus X51L (2009) + MSI GX723 (2009)
Xubuntu 22.04 > HP 15BA048NF (2018)

Hors ligne

#28 Le 11/12/2014, à 12:34

tiramiseb

Re : [Résolu] Connexion ssh : needpriv 0

1) Il m'a fallu désactiver le parefeu coté machine.
D'après ce que j'ai vu, ce n'est pas la bonne solution, il vaut mieux ajouter explicitement les ports à autoriser.
Faut que je vois çà ...

Le pare-feu n'est pas obligatoire, bien au contraire. Je ne vais pas réécrire tout un roman, j'ai de nombreuses fois expliqué pourquoi dans ce même forum et un magazine contenant un article reprenant mes explications sortira bientôt.

2), et çà m'inquiète un peu, il m'a fallu activer le DMZ sur la box.
Je ne sais pas trop à quoi sert ce truc, et de plus, sur la livebox v1, ne n'est pas nécessaire.

Euh il y a de fortes chances que ce soit ça qui a débloqué ta situation et non tes règles.

Pour les box, le terme "DMZ" (très mal utilisé) désigne la redirection de l'intégralité des requêtes publiques vers une machine interne, quel que soit le port TCP ou UDP demandé.
Ça revient à mettre la machine en question en frontal. Pas beau pas beau...

Hors ligne

#29 Le 11/12/2014, à 12:43

JujuLand

Re : [Résolu] Connexion ssh : needpriv 0

Euh il y a de fortes chances que ce soit ça qui a débloqué ta situation et non tes règles.

Pour les box, le terme "DMZ" (très mal utilisé) désigne la redirection de l'intégralité des requêtes publiques vers une machine interne, quel que soit le port TCP ou UDP demandé.
Ça revient à mettre la machine en question en frontal. Pas beau pas beau...

Cà pourrait expliquer que je ne puisse pas activer le DMZ pour la deuxième machine ?
Et que, comme le pour le port 22112 qui n'est pas ouvert sur la première machine, mais sur la deuxième, canyouseeme me reponde 'connexion refused' ?

A+


Xubuntu 16.04 > Dell DM061 (2007) + Dell Inspiron 531 (2008)
Xubuntu 16.04 > Asus X51L (2009) + MSI GX723 (2009)
Xubuntu 22.04 > HP 15BA048NF (2018)

Hors ligne

#30 Le 11/12/2014, à 12:44

tiramiseb

Re : [Résolu] Connexion ssh : needpriv 0

Ah ben oui, ce machin-là qu'ils appellent "DMZ" ne s'applique que pour une seule adresse IP locale.

Hors ligne

#31 Le 11/12/2014, à 14:39

JujuLand

Re : [Résolu] Connexion ssh : needpriv 0

Voilà la réponse à mon problème ...

http://communaute.orange.fr/t5/ma-conne … /td-p/7784

Bonjour,
Ne vous prenez plus la tête avec le NAT de la Livebox Pro V3...  Le problème est bien connu chez Orange ( a condition de tomber sur la bonne personne...) c'est un problème de la V3... la solution et bien c'est tout simplement demander l'échange pour une pro V2.. moins jolie, sans ecran, mais très stable et qui se paramètre très bien.

En terme de caracteristiques la "seule" difference notable c'est qu'en WIFI n , elle ne travaille qu'en 2,4GHz au lieu d'avoir ausi la bande des 5GHz pour se coupler a une autre Livebox...

Je m'en doutais ... je vais donc demander le remplacement de la v3 par la v2
et en attendant, je m'en vais désactiver le DMZ

J'aime bien le lapsus révélateur de ce forum qui n'affiche que les parties intéressantes d'une URL smile

A+

Dernière modification par JujuLand (Le 11/12/2014, à 14:41)


Xubuntu 16.04 > Dell DM061 (2007) + Dell Inspiron 531 (2008)
Xubuntu 16.04 > Asus X51L (2009) + MSI GX723 (2009)
Xubuntu 22.04 > HP 15BA048NF (2018)

Hors ligne

#32 Le 20/12/2014, à 15:47

JujuLand

Re : [Résolu] Connexion ssh : needpriv 0

Bon, j'ai changé la livebox pro v3 pour une pro v2, mais pas de bol, la pro v2 n'est pas compatible vdsl (ou xdsl)
Retour avec une nouvelle pro v3.
J'ai eu la confirmation qu'avec un pro v3, il y avait des problèmes avec le NAT/PAT, mais qu'il y avait une astuce pour solutionner çà:
Au cas ou la livebox aurait déjà été paramétrée, et que çà ne fonctionne pas, il faut :
- faire un reset de la box
- enlever la carte sim
-faire tout le paramétrage connexion internet, parefeu, NAT/PAT sans la carte.
-remettre la carte

J'avais toujours des timeout, alors que canyouseeme me disais ok
Il m'a fallu ouvrir les ports dans le firewall coté client.

Cà semble fonctionner mieux, et j'ai été capable d'atteindre une des machines. La deuxième avait du être éteinte. Mais j'ai encore quelque problèmes, qui doivent se situer du coté du serveur:

alain@Gramps-JujuLand:~$ ssh -vvv -p 22111 jacques@xx.xx.xxx.xxx
OpenSSH_5.9p1 Debian-5ubuntu1.4, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to xx.xx.xxx.xxx [xx.xx.xxx.xxx] port 22111.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/alain/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /home/alain/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/alain/.ssh/id_rsa-cert type -1
debug1: identity file /home/alain/.ssh/id_dsa type -1
debug1: identity file /home/alain/.ssh/id_dsa-cert type -1
debug1: identity file /home/alain/.ssh/id_ecdsa type -1
debug1: identity file /home/alain/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.4
debug2: fd 3 setting O_NONBLOCK
debug3: put_host_port: [xx.xx.xxx.xxx]:22111
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
debug3: put_host_port: [xx.xx.xxx.xxx]:22111
debug3: put_host_port: [xx.xx.xxx.xxx]:22111
debug1: checking without port identifier
The authenticity of host '[xx.xx.xxx.xxx]:22111 ([xx.xx.xxx.xxx]:22111)' can't be established.
ECDSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'xx.xx.xxx.xxx]:22462' (ECDSA) to the list of known hosts.
debug1: ssh_ecdsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/alain/.ssh/id_rsa (0x7ff09d3230e0)
debug2: key: /home/alain/.ssh/id_dsa ((nil))
debug2: key: /home/alain/.ssh/id_ecdsa ((nil))
debug1: Authentications that can continue: publickey
debug3: start over, passed a different list publickey
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/alain/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/alain/.ssh/id_dsa
debug3: no such identity: /home/alain/.ssh/id_dsa
debug1: Trying private key: /home/alain/.ssh/id_ecdsa
debug3: no such identity: /home/alain/.ssh/id_ecdsa
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey).

Je ne m'explique pas que çà ne passe pas cette fois ...

Je reverrai la config coté serveur, des fois que j'ai raté un truc ???

Merci
A+

Dernière modification par JujuLand (Le 27/12/2014, à 15:04)


Xubuntu 16.04 > Dell DM061 (2007) + Dell Inspiron 531 (2008)
Xubuntu 16.04 > Asus X51L (2009) + MSI GX723 (2009)
Xubuntu 22.04 > HP 15BA048NF (2018)

Hors ligne

#33 Le 27/12/2014, à 15:15

JujuLand

Re : [Résolu] Connexion ssh : needpriv 0

Bon, j'ai revu coté serveur, et je ne remarque rien d'incorrect.
J'ai autorisé aussi l'identification par mot de passe, Mais rien ne passe ...

Sur le premier serveur, j'ai un timeout, bien que le serveur soit bien lancé
Sur le deuxième serveur, j'ai les messages suivants (légèrement différents du post précédent, vu la possibilité des mots de passe, mais çà bloque toujours:

alain@Gramps-JujuLand:~$ ssh -vvv -p 22111 jacques@xx.xx.xxx.xxx
OpenSSH_5.9p1 Debian-5ubuntu1.4, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to xx.xx.xxx.xxx [xx.xx.xxx.xxx] port 22111.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/alain/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /home/alain/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/alain/.ssh/id_rsa-cert type -1
debug1: identity file /home/alain/.ssh/id_dsa type -1
debug1: identity file /home/alain/.ssh/id_dsa-cert type -1
debug1: identity file /home/alain/.ssh/id_ecdsa type -1
debug1: identity file /home/alain/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.4
debug2: fd 3 setting O_NONBLOCK
debug3: put_host_port: [xx.xx.xxx.xxx]:22111
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
debug3: put_host_port: [xx.xx.xxx.xxx]:22111
debug3: put_host_port: [xx.xx.xxx.xxx]:22111
debug1: checking without port identifier
The authenticity of host '[xx.xx.xxx.xxx]:22111 ([xx.xx.xxx.xxx]:22111)' can't be established.
ECDSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[xx.xx.xxx.xxx]:22111' (ECDSA) to the list of known hosts.
debug1: ssh_ecdsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/alain/.ssh/id_rsa (0x7f7bc8f32080)
debug2: key: /home/alain/.ssh/id_dsa ((nil))
debug2: key: /home/alain/.ssh/id_ecdsa ((nil))
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/alain/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/alain/.ssh/id_dsa
debug3: no such identity: /home/alain/.ssh/id_dsa
debug1: Trying private key: /home/alain/.ssh/id_ecdsa
debug3: no such identity: /home/alain/.ssh/id_ecdsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
jacques@xx.xx.xxx.xxx's password: 
debug3: packet_send2: adding 32 (len 77 padlen 19 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
jacques@xx.xx.xxx.xxx's password: 
debug3: packet_send2: adding 64 (len 59 padlen 5 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
jacques@xx.xx.xxx.xxx's password: 
debug3: packet_send2: adding 64 (len 52 padlen 12 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: Authentications that can continue: publickey,password
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,password).

Ce que je remarque, c'est que le client envoie bien la clé, puis le mot de passe, mais semble ne pas avoir de réponse à ces envois.

debug2: we sent a publickey packet, wait for reply
debug2: we sent a password packet, wait for reply

Quand on débloque le parefeu de la box sur un port bien spécifique, c'est dans un sens ou dans les deux ?

Je commence à désespérer d'arriver à me connecter ...

Merci de vos lumières
A+

Dernière modification par JujuLand (Le 27/12/2014, à 15:26)


Xubuntu 16.04 > Dell DM061 (2007) + Dell Inspiron 531 (2008)
Xubuntu 16.04 > Asus X51L (2009) + MSI GX723 (2009)
Xubuntu 22.04 > HP 15BA048NF (2018)

Hors ligne

#34 Le 01/01/2015, à 13:13

JujuLand

Re : [Résolu] Connexion ssh : needpriv 0

Je me réponds, vu que j'ai avancé un peu:

Quand on débloque le parefeu de la box sur un port bien spécifique, c'est dans un sens ou dans les deux ?

Normalement, si la box fait du PAT, il suffit d'indiquer le port coté serveur, et 'Tous' (ou 'any') pour le port coté client
Malheureusement, la Livebox Pro V3 est une vrai m... et ne permet pas (malgré ce qui est dit dans les menus et exemples) de faire du PAT, et il faut donc configurer le NAT/PAT ainsi:

NAT/PAT
Service              SSH_111
Protocole            TCP
Port interne         22111
Port externe         22111
IP serveur           192.168.1.111

Bon, le problème semble réglé coté PAT, et la connexion fonctionne enfin.Par contre, çà ne semble pas encore fonctionner coté NAT, car si j'arrive à atteindre un premier serveur, j'ai un timeout sur le deuxième. Mais il faut que je revérifie que le DMZ ne soit pas activé, car lors de mes essais, à un moment, je l'avais active, mais pourtant canyouseeme me donnerait une erreur sur le test avec le port utilisé par le second serveur ...

A suivre ...
A+ et Bonne Année 2015


Xubuntu 16.04 > Dell DM061 (2007) + Dell Inspiron 531 (2008)
Xubuntu 16.04 > Asus X51L (2009) + MSI GX723 (2009)
Xubuntu 22.04 > HP 15BA048NF (2018)

Hors ligne

#35 Le 06/01/2015, à 23:47

JujuLand

Re : [Résolu] Connexion ssh : needpriv 0

Je récapitule la config distante où se trouve les deux serveurs ssh derrière une Livebox Pro v3

gadel-pc2 : compte jacques (rsa)
gadel-pc1 : comptes anne-sophie (passwd) et gadel (rsa)

Voici les diverses tentatives de connexions:

Depuis mon domicile:

gadel-pc2:

alain@Gramps-JujuLand:~$ ssh -p 22222 jacques@xx.xx.xxx.xxx
Last login: Tue Jan  6 22:03:35 2015 from atoulouse-xxx-x-xxx-xx.wxx-xx.abo.wanadoo.fr
 
jacques@gadel-pc2:~$
jacques@gadel-pc2:~$ ls /home
jacques  kmaster  lost+found
jacques@gadel-pc2:~$ hostname
gadel-pc2

gadel-pc1:

alain@Gramps-JujuLand:~$ ssh -p 22111 gadel@xx.xx.xxx.xxx
ssh: connect to host xx.xx.xxx.xxx port 22111: Connection timed out

alain@Gramps-JujuLand:~$ ssh -p 22111 anne-sophie@xx.xx.xxx.xxx
ssh: connect to host xx.xx.xxx.xxx port 22111: Connection timed out

Depuis mon domicile mais

gadel-pc1 (depuis la connexion à gadel-pc2) passwd

jacques@gadel-pc2:~$ ssh -p 22111 anne-sophie@192.168.1.12
anne-sophie@192.168.1.12's password:
Last login: Tue Jan  6 21:53:12 2015 from gadel-pc2

anne-sophie@gadel-pc1:~$ hostname
gadel-pc1
anne-sophie@gadel-pc1:~$ ls /home
anne-sophie gadel
anne-sophie@gadel-pc1:~$ exit
déconnexion
Connection to 192.168.1.12 closed.

C'est correct ...

gadel-pc1 (depuis la connexion à gadel-pc2) RSA

jacques@gadel-pc2:~$ ssh -p 22111 gadel@192.168.1.12
Enter passphrase for key '/home/jacques/.ssh/id_rsa':
Last login: Tue Jan  6 21:59:09 2015 from gadel-pc2

gadel@gadel-pc1:~$
gadel@gadel-pc1:~$ hostname
gadel-pc1

La connexion passe, mais il me demande la clé située coté client (/home/jacques/.ssh). Est-ce normal ?
Il est vrai que la connexion est effectuée depuis une connexion sous pts/02 (par exemple) et non sous :0, et donc il travaille en mode texte, contrairement à une connexion depuis :0 comme depuis chez moi.
Je ne suis pas loin de penser que c'est normal.

Par contre, le fait de ne pouvoir se connecter à aucun des comptes de gadel-pc1 depuis chez moi, çà semble accuser la livebox, qui ne semble pas savoir faire du NAT sur plusieurs adresses.

Dans la config du parefeu et du NAT-PAT, les règles concernant gadel-pc1 ont été déclarées avant celle de gadel-pc2. Il semblerait que la deuxième règle écrase la première ... je vais tenter de changer, en deux fois, l'ordre d'apparition des règles voir si le défaut ne change pas de machine ... pour confirmer que c'est la box.

Après avoir relevé que cette saloperie ne savait pas faire du PAT, voilà maintenant qu'elle semble ne pas savoir faire du NAT sur plusieurs machines ... ggrrr ...

Une idée qui pourrait me débloquer ?

Merci
A+


Xubuntu 16.04 > Dell DM061 (2007) + Dell Inspiron 531 (2008)
Xubuntu 16.04 > Asus X51L (2009) + MSI GX723 (2009)
Xubuntu 22.04 > HP 15BA048NF (2018)

Hors ligne

#36 Le 10/01/2015, à 22:12

JujuLand

Re : [Résolu] Connexion ssh : needpriv 0

Bon, il semble normal que le client, après quelques échanges avec le serveur demande la clé qui est située sur le client. La saisie sera probablement ensuite comparée à la clée située dans authorized_keys sur le serveur.

Bon, même si le problème de NAT sur la livebox pro v3 m'empêche la connexion en direct sur le deuxième ordi, je passe au travers de la connexion sur lr premier.

Je le passe donc en résolu.

A+


Xubuntu 16.04 > Dell DM061 (2007) + Dell Inspiron 531 (2008)
Xubuntu 16.04 > Asus X51L (2009) + MSI GX723 (2009)
Xubuntu 22.04 > HP 15BA048NF (2018)

Hors ligne