
Макс
13.08.2016
10:50:17
root@vagrant-ubuntu-trusty-64:/home/vagrant/tst# ssh -vvvv
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-E log_file] [-e escape_char]
[-F configfile] [-I pkcs11] [-i identity_file]
[-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec]
[-O ctl_cmd] [-o option] [-p port]
[-Q cipher | cipher-auth | mac | kex | key]
[-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port]
[-w local_tun[:remote_tun]] [user@]hostname [command]

Алексей
13.08.2016
10:51:24
ну
хост то укажи :)

Макс
13.08.2016
10:55:39
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
ssh: Could not resolve hostname xxxxxxx:10022: Name or service not known

Google

Макс
13.08.2016
10:56:18
хмм...

Алексей
13.08.2016
10:57:12
-P 10022
порт надо указыаать


Макс
13.08.2016
10:58:13
а... через : нельзя значит...
ой, там что-то сейчас дофига всего вывелось... сейчас попробую вычленить важное
root@vagrant-ubuntu-trusty-64:/home/vagrant/tst# ssh -v git@xxxxxx.ru -P 10022
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to xxxxxxxx.ru [x.x.x.x] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type 1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7p1 Debian-5+deb8u3
debug1: match: OpenSSH_6.7p1 Debian-5+deb8u3 pat OpenSSH* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-sha1-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 9f:1c:30:05:7d:b5:26:7e:0b:56:09:db:6c:73:8d:44
debug1: Host 'xxxxx.ru' is known and matches the ECDSA host key.
debug1: Found key in /root/.ssh/known_hosts:3
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /root/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Trying private key: /root/.ssh/id_ecdsa
debug1: Trying private key: /root/.ssh/id_ed25519
debug1: Next authentication method: password
git@xxxxx.ru's password:
мда.... нифига не понимаю, что происходит :D
то есть компы о протоколе договорились и стали пытаться обмениваться ключами, но не нашли подходящих ключей?


Andrew
13.08.2016
11:04:38
потому-что пытались искать id_dsa а ты пытаешься скормить id_rsa

Макс
13.08.2016
11:04:58
да, я вот тоже смотрю, что у меня нет этих файлов ключей
они видимо не появились при генерации.
И что, тупо переименовать файл?

Andrew
13.08.2016
11:05:43
нет

Google

Макс
13.08.2016
11:06:10
А что тогда? Как-то генерить?

Andrew
13.08.2016
11:06:28
я бы разобрался почему он хочет id_dsa

Макс
13.08.2016
11:09:37
Я так понимаю, что клиент сначала пытается использовать id_rsa? А потом уже начинает перебирать другие возможные ключи? id_rsa косячный?

Andrew
13.08.2016
11:11:46
посмотри на сервере
PubkeyAuthentication Yes
RSAAuthentication Yes
PermitRootLogin Yes
такое стоит?
особенно 2 строчку

Макс
13.08.2016
11:16:48
PubkeyAuthentication Yes
RSAAuthentication Yes
PermitRootLogin No
это в /etc/ssh/sshd_config

Andrew
13.08.2016
11:18:41
все правильно тогда

Макс
13.08.2016
11:19:24
Правильно - это когда работает :D

Andrew
13.08.2016
11:21:59
а ты уверен

Макс
13.08.2016
11:22:15
Сейчас удалил инфу о сервере, чтобы ключи снова запросило... может в этом загвоздка..

Andrew
13.08.2016
11:22:24
что у пользователя git на сервере в .ssh/autorized_keys лежит кей от root?


Макс
13.08.2016
11:23:10
root@vagrant-ubuntu-trusty-64:/home/vagrant/tst# ssh -v git@xxxxxx.ru -P 10022
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to xxxxxx.ru [x.x.x.x] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type 1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7p1 Debian-5+deb8u3
debug1: match: OpenSSH_6.7p1 Debian-5+deb8u3 pat OpenSSH* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-sha1-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 9f:1c:30:05:7d:b5:26:7e:0b:56:09:db:6c:73:8d:44
The authenticity of host 'xxxxxx.ru (x.x.x.x)' can't be established.
ECDSA key fingerprint is 9f:1c:30:05:7d:b5:26:7e:0b:56:09:db:6c:73:8d:44.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'xxxxxx.ru,x.x.x.x' (ECDSA) to the list of known hosts.
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /root/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Trying private key: /root/.ssh/id_ecdsa
debug1: Trying private key: /root/.ssh/id_ed25519
debug1: Next authentication method: password
git@xxxxxx.ru's password:


Andrew
13.08.2016
11:23:38

Макс
13.08.2016
11:25:20
сейчас залезу туда...
Вот на сервере такой набор ключей:
ssh_host_dsa_key
ssh_host_ecdsa_key
ssh_host_ed25519_key
ssh_host_key
ssh_host_rsa_key
ssh_host_dsa_key.pub
ssh_host_ecdsa_key.pub
ssh_host_ed25519_key.pub
ssh_host_key.pub
ssh_host_rsa_key.pub
id_rsa тут нет

Алексей
13.08.2016
11:29:32
Эх

Google

Макс
13.08.2016
11:29:41
а... так это сервера все ключи...
сейчас гляну в авторизед

Алексей
13.08.2016
11:29:53
Макс ты не туда смотришь
Вот

Макс
13.08.2016
11:30:56
в авторизед есть

Vasiliy
13.08.2016
11:31:28
лол, 2 докер-чатика, это так символично, простите, не сдержался

Макс
13.08.2016
11:31:28
Макс ты не туда смотришь
Так я не знаю куда смотреть. Знал бы, сделал бы сам. А так я реально не понимаю что происходит )))

yopp
13.08.2016
11:32:02

Алексей
13.08.2016
11:32:23

Evgeny
13.08.2016
11:32:28
На оверлее?

Алексей
13.08.2016
11:32:31
Питона вот три

Evgeny
13.08.2016
11:32:47
Сварм и мультихост?

Vasiliy
13.08.2016
11:32:48
Питона вот три
именно в телеграмме? русскоязычных? ладно) я просто угарнул, это прям так смешно, что я не мог просто промолчать

yopp
13.08.2016
11:32:48

Алексей
13.08.2016
11:33:29

Semyon
13.08.2016
11:33:46

yopp
13.08.2016
11:34:07
Я думаю попробовать сварм

Макс
13.08.2016
11:34:50
Так куда мне рыть этот ssh? ?

Google

Semyon
13.08.2016
11:35:11

Макс
13.08.2016
11:35:24
естественно

yopp
13.08.2016
11:35:47

Semyon
13.08.2016
11:36:00
естественно
я бы перепроверил, потому что вот прямо похоже
у меня как раз гитлаб вот ровно с этого образа

Evgeny
13.08.2016
11:36:35

yopp
13.08.2016
11:36:43
А.

Макс
13.08.2016
11:37:00

Semyon
13.08.2016
11:37:09
ну, вообще да, справедливо

Макс
13.08.2016
11:37:24
генерил ключи раз 5

Admin
ERROR: S client not available

Andrew
13.08.2016
11:37:52
ты генерил под рутом? закидывал тоже рутовские?

Макс
13.08.2016
11:37:59
да

Andrew
13.08.2016
11:37:59
если ты генерил от своего юзернейма

Макс
13.08.2016
11:38:18
нет, все под рутом

Andrew
13.08.2016
11:39:56
странно, но похоже на то что он берет id_rsa сравнивает, говорит о нет не подошел, мб подойдет id_dsa?ой а таких нет, введите пожалуйста пароль
сделай у себя на машине чтоли chmod 700 /root/.ssh/ мб дело в правах

Макс
13.08.2016
11:40:35
меня вот это напрягает:
debug1: Server host key: ECDSA 9f:1c:30:05:7d:b5:26:7e:0b:56:09:db:6c:73:8d:44
The authenticity of host 'xxxxxx.ru (x.x.x.x)' can't be established.
Что такое это ECDSA?
алгоритм... ок

Google

Макс
13.08.2016
11:42:10
может прикол в том, что сервер засылая мне ключ ECDSA и требует авторизацию по нему тоже?
Хотя настройка RSAAuthentication Yes намекает...
ничего не понимаю, короче

Andrew
13.08.2016
11:43:24
пробовал?
сделай у себя на машине чтоли chmod 700 /root/.ssh/ мб дело в правах
а можешь дать вывод ls -al /root/.ssh/

Макс
13.08.2016
11:43:53
у меня там 777 в руте
а не, гоню..

Andrew
13.08.2016
11:44:20
если 777 тоже плохо, ssh не любит файлы 777

Макс
13.08.2016
11:44:23
700

Andrew
13.08.2016
11:44:44
собственник точно root? или же нет?

Макс
13.08.2016
11:45:11
root@vagrant-ubuntu-trusty-64:~/.ssh# ls -al /root/.ssh
total 20
drwx------ 2 root root 4096 Aug 12 21:59 .
drwx------ 6 root root 4096 Aug 12 22:11 ..
-rw------- 1 root root 0 Jul 7 18:24 authorized_keys
-rw------- 1 root root 1675 Aug 12 22:03 id_rsa
-rw-r--r-- 1 root root 403 Aug 12 22:03 id_rsa.pub
-rw-r--r-- 1 root root 444 Aug 13 11:18 known_hosts
собственник рут, да

Semyon
13.08.2016
11:45:25
стопэ
а, не, всё ок
я запутался в слоях виртуализации :)
у тебя на чём-то вагрант, в вагранте докер, в докере гитлаб?

Макс
13.08.2016
11:46:54
у меня локально Вагрант в винде, а Гитлаб торчит на нормальном сервере Дебиан + докер + гитлаб
И как бы на той стороне-то в гитлабе на докере все должно быть нормально настроено же уже... Проблема скорее в моей стороне.

Andrew
13.08.2016
11:49:30
ключи ты сегодня создавал?

Макс
13.08.2016
11:49:35
вчера
могу прямо сейчас снова создать

Andrew
13.08.2016
11:50:13
а ты закидывал отпечаток id_rsa.pub?