Sergey
да-да, я только хотел спросить
Sergey
какого фига?
Ivan
хз. я же сказал, я не дружу с ключами... я вообще не понимаю где какой должен быть
bebebe
@beatlejyse признайтесь, вы тоже курите с утра? и в обед?
Sergey
bebebe
если да, то тут нужно немного практики, что бы потом не подсовывать публичные ключи ssh'у
✠ FLASh ✠
нужно а авторайзер кейс добавлять паблик ключик а при ссх использовать приват
Sergey
в качесте параметра ты передаёшь openssh закрытый ключ, а на сервер кладёшь открытый.
сообщения от тебя закрываются твоим личным закрытым, а сервер их с помощью твоего открытого открывает. если кратко и на пальцах.
Sergey
важно, что по открытому нельзя узнать закрытый (в общем случае), ты открытым своим можешь хоть все заборы исписать
Sergey
именно поэтому его можно хзкуда на удалённые ноды класть
Ivan
ок. сейчас сделаю
Адаптивный Рекомбинатор
ох, я очень удивлен, что коллегу не послали в гугл.
Адаптивный Рекомбинатор
спасибо парни)
Адаптивный Рекомбинатор
моя вера в ИТ-сообщество немного возросла
Sergey
звезды так сошлись, или карты легли или...
Ivan
root@9730b65b21cd:~/.ssh# ssh -v core@192.168.204.181 -i id_rsa
OpenSSH_7.5p1 Ubuntu-5ubuntu1, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.204.181 [192.168.204.181] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: key_load_public: No such file or directory
debug1: identity file id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.5p1 Ubuntu-5ubuntu1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.204.181:22 as 'core'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:65Ye0XEJbJqxYtyE+S6k2ixJnXcge+vQ5n/C4RBGU0E
debug1: Host '192.168.204.181' is known and matches the ECDSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-s
ha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: id_rsa
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "id_rsa": bad permissions
debug1: Next authentication method: keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
core@192.168.204.181's password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Permission denied, please try again.
core@192.168.204.181's password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Permission denied, please try again.
core@192.168.204.181's password:
Received disconnect from 192.168.204.181 port 22:2: Too many authentication failures
Authentication failed.
bebebe
Permissions 0644 for 'id_rsa' are too open.
bebebe
chmod 600 id_rsa
Ivan
root@9730b65b21cd:~/.ssh# ssh -v core@192.168.204.181 -i id_rsa
OpenSSH_7.5p1 Ubuntu-5ubuntu1, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.204.181 [192.168.204.181] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: key_load_public: No such file or directory
debug1: identity file id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.5p1 Ubuntu-5ubuntu1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.204.181:22 as 'core'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:65Ye0XEJbJqxYtyE+S6k2ixJnXcge+vQ5n/C4RBGU0E
debug1: Host '192.168.204.181' is known and matches the ECDSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-s
ha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: id_rsa
Load key "id_rsa": invalid format
debug1: Next authentication method: keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
core@192.168.204.181's password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Permission denied, please try again.
core@192.168.204.181's password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Permission denied, please try again.
core@192.168.204.181's password:
Received disconnect from 192.168.204.181 port 22:2: Too many authentication failures
Authentication failed.
Sergey
моя вера в ИТ-сообщество немного возросла
Да всё нормально с сообществом есть, оно просто ленивых, тупых, жадных и наглых лентяев на дух не переносит, поэтому мамкиным майнерам да папкиным сеошнегам прилетает часто. А если человек внятно общается и более-менее адекватно излагает суть вопроса - то мы тут нафига собрались? Помогать друг другу.
bebebe
@beatlejyse а вы упорный человек, прямо как моя бывшая
вас случаем не Анастасия зовут?
Load key "id_rsa": invalid format
Ivan
Sergey
а файл типа потерялся где-то между делом? O_o
Sergey
ну или его формат негодный
bebebe
touch id_rsa
bebebe
всегда так делаю, когда ключ теряю
Oleg
а что не так с 600?
Ivan
root@9730b65b21cd:~/.ssh# ssh -v core@192.168.204.181 -i id_rsa
OpenSSH_7.5p1 Ubuntu-5ubuntu1, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.204.181 [192.168.204.181] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: key_load_public: No such file or directory
debug1: identity file id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.5p1 Ubuntu-5ubuntu1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.204.181:22 as 'core'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:65Ye0XEJbJqxYtyE+S6k2ixJnXcge+vQ5n/C4RBGU0E
debug1: Host '192.168.204.181' is known and matches the ECDSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-s
ha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
core@192.168.204.181's password:
Authentication failed.
Sergey
root@9730b65b21cd:~/.ssh# ssh -v core@192.168.204.181 -i id_rsa
OpenSSH_7.5p1 Ubuntu-5ubuntu1, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.204.181 [192.168.204.181] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: key_load_public: No such file or directory
debug1: identity file id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.5p1 Ubuntu-5ubuntu1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.204.181:22 as 'core'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:65Ye0XEJbJqxYtyE+S6k2ixJnXcge+vQ5n/C4RBGU0E
debug1: Host '192.168.204.181' is known and matches the ECDSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-s
ha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
core@192.168.204.181's password:
Authentication failed.
до кучи уж - stat ./*
Ivan
root@9730b65b21cd:~/.ssh# ssh -v core@192.168.204.181 -i id_rsa -stat ./*
OpenSSH_7.5p1 Ubuntu-5ubuntu1, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.204.181 [192.168.204.181] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: key_load_public: No such file or directory
debug1: identity file id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.5p1 Ubuntu-5ubuntu1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.204.181:22 as 'core'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:65Ye0XEJbJqxYtyE+S6k2ixJnXcge+vQ5n/C4RBGU0E
debug1: Host '192.168.204.181' is known and matches the ECDSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-s
ha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
core@192.168.204.181's password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Permission denied, please try again.
core@192.168.204.181's password:
Received disconnect from 192.168.204.181 port 22:2: Too many authentication failures
Authentication failed.
Aleksei
ну кавычки же
Sergey
тьфу
Sergey
вообще-то это отдельная команда
Tadeusz
ггг
Sergey
покажет все файлы и права доступа на них
Tadeusz
админщина
Aleksei
почему никто не юзает телеграмовские кавычки
Aleksei
ну или пастбин накрайняк
dk
dk
И не работает :)
Tadeusz
удобно
Sergey
Tadeusz
всем похуй (с) Шнур
dk
Какие апострофы не пиши - не работает
Sergey
проверко
Sergey
ну я ж говорю - дерьмо с переключением раскладки
Sergey
у меня это апострофы - там, где ё на клавиатуре
Дима
всё нормально работает
Ivan
вообще-то это отдельная команда
сорян ))
root@9730b65b21cd:~/.sshBlocks: 8 IO Block: 4096 regular file
Device: 2ah/42daInode: 7448 Links: 1
Access: (0600/-rw-------Blocks: 8 IO Block: 4096 regular file
Device: 2ah/42d-Inode: 249 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-08-15 09:46:17.985328040 +0000
Modify: 2017-08-15 09:45:07.865793756 +0000
Change: 2017-08-15 09:45:07.865793756 +0000
Birth: -22
Ivan
это видимо маркдаун в телеграме работает
Николай
Artyom
работает
Aleksei
*не работает*
Sergey
dk
Обнови его
Последняя ~версия~ и *так* `установлена`
Tadeusz
_ничем?_
Tadeusz
версия тут вообще не при чем, я в веб версии и тут работает
dk
_чем_ __чем__
dk
-зачеркнуто- или --нет--?
Дима
))
dk
В общем, в версии для ipad не работает ничего :)
Ivan
нихера не понял - где id_rsa?
на месте:
root@9730b65b21cd:~/.ssh# ls -la
total 16
drwx------ 2 root root 4096 Aug 15 09:54 .
drwx------ 4 root root 4096 Aug 15 09:54 ..
-rw------- 1 root root 3244 Aug 15 09:54 id_rsa
-rw-r--r-- 1 root root 222 Aug 15 09:45 known_hosts
Дима
Дима
http://spectrox.ru/strikethrough/
Дима
¯\_(ツ)_/¯
Aleksei
cat id_rsa
dk
Ivan
Vitaliy
ндя
Sergey
Sergey
openssh-keygen