Guest User

Untitled

a guest
Dec 10th, 2018
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.78 KB | None | 0 0
  1. 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
  2. eval $(ssh-agent -s)
  3.  
  4. ##
  5. ## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
  6. ## We're using tr to fix line endings which makes ed25519 keys work
  7. ## without extra base64 encoding.
  8. ## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
  9. ##
  10. echo "$SSH_PRIVATE_KEY" | tr -d 'r' | ssh-add - > /dev/null
  11.  
  12. mkdir -p ~/.ssh
  13. chmod 700 ~/.ssh
  14.  
  15. echo "$SSH_PRIVATE_KEY" > ~/.ssh/known_hosts
  16. chmod 644 ~/.ssh/known_hosts
  17. ssh -vvv user@server
  18.  
  19. Running with gitlab-runner 11.5.0 (3afdaba6)
  20. on Runner2 7eb17b67
  21. Using Docker executor with image node:11.2 ...
  22. Pulling docker image node:11.2 ...
  23. Using docker image sha256:e9737a5f718d8364a4bde8d82751bf0d2bace3d1b6492f6c16f1526b6e73cfa4 for node:11.2 ...
  24. Running on runner-7eb17b67-project-40-concurrent-0 via server...
  25. Fetching changes...
  26. Removing node_modules/
  27. HEAD is now at aa4a605 removing bugged command line
  28. Checking out aa4a6054 as integrate_cd...
  29. Skipping Git submodules setup
  30. Checking cache for default...
  31. No URL provided, cache will be not downloaded from shared cache server. Instead a local version of cache will be extracted.
  32. Successfully extracted cache
  33. $ which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )
  34. /usr/bin/ssh-agent
  35. $ eval $(ssh-agent -s)
  36. Agent pid 14
  37. $ echo "$SSH_WESTEROS_PRIV_KEY" | ssh-add - > /dev/null
  38. Identity added: (stdin) ((stdin))
  39. $ mkdir -p ~/.ssh
  40. $ chmod 700 ~/.ssh
  41. $ echo "$SSH_WESTEROS_KNOWNHOST_KEY" > ~/.ssh/known_hosts
  42. $ chmod 644 ~/.ssh/known_hosts
  43. $ ssh -p 5555 -vvv t3lweb@westeros.hec.ca
  44. OpenSSH_7.4p1 Debian-10+deb9u4, OpenSSL 1.0.2l 25 May 2017
  45. debug1: Reading configuration data /etc/ssh/ssh_config
  46. debug1: /etc/ssh/ssh_config line 19: Applying options for *
  47. Pseudo-terminal will not be allocated because stdin is not a terminal.
  48. debug2: resolving "westeros.hec.ca" port 5555
  49. debug2: ssh_connect_direct: needpriv 0
  50. debug1: Connecting to westeros.hec.ca [132.211.132.122] port 5555.
  51. debug1: Connection established.
  52. debug1: permanently_set_uid: 0/0
  53. debug1: key_load_public: No such file or directory
  54. debug1: identity file /root/.ssh/id_rsa type -1
  55. debug1: key_load_public: No such file or directory
  56. debug1: identity file /root/.ssh/id_rsa-cert type -1
  57. debug1: key_load_public: No such file or directory
  58. debug1: identity file /root/.ssh/id_dsa type -1
  59. debug1: key_load_public: No such file or directory
  60. debug1: identity file /root/.ssh/id_dsa-cert type -1
  61. debug1: key_load_public: No such file or directory
  62. debug1: identity file /root/.ssh/id_ecdsa type -1
  63. debug1: key_load_public: No such file or directory
  64. debug1: identity file /root/.ssh/id_ecdsa-cert type -1
  65. debug1: key_load_public: No such file or directory
  66. debug1: identity file /root/.ssh/id_ed25519 type -1
  67. debug1: key_load_public: No such file or directory
  68. debug1: identity file /root/.ssh/id_ed25519-cert type -1
  69. debug1: Enabling compatibility mode for protocol 2.0
  70. debug1: Local version string SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u4
  71. debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2
  72. debug1: match: OpenSSH_7.2 pat OpenSSH* compat 0x04000000
  73. debug2: fd 3 setting O_NONBLOCK
  74. debug1: Authenticating to westeros.hec.ca:5555 as 't3lweb'
  75. debug3: put_host_port: [westeros.hec.ca]:5555
  76. debug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts"
  77. debug3: record_hostkey: found key type RSA in file /root/.ssh/known_hosts:2
  78. debug3: record_hostkey: found key type ECDSA in file /root/.ssh/known_hosts:4
  79. debug3: record_hostkey: found key type ED25519 in file /root/.ssh/known_hosts:6
  80. debug3: load_hostkeys: loaded 3 keys from [westeros.hec.ca]:5555
  81. debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
  82. debug3: send packet: type 20
  83. debug1: SSH2_MSG_KEXINIT sent
  84. debug3: receive packet: type 20
  85. debug1: SSH2_MSG_KEXINIT received
  86. debug2: local client KEXINIT proposal
  87. debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
  88. debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
  89. debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc
  90. debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc
  91. debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
  92. debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
  93. debug2: compression ctos: none,zlib@openssh.com,zlib
  94. debug2: compression stoc: none,zlib@openssh.com,zlib
  95. debug2: languages ctos:
  96. debug2: languages stoc:
  97. debug2: first_kex_follows 0
  98. debug2: reserved 0
  99. debug2: peer server KEXINIT proposal
  100. debug2: KEX algorithms: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
  101. debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519
  102. debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
  103. debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
  104. debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
  105. debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
  106. debug2: compression ctos: none,zlib@openssh.com
  107. debug2: compression stoc: none,zlib@openssh.com
  108. debug2: languages ctos:
  109. debug2: languages stoc:
  110. debug2: first_kex_follows 0
  111. debug2: reserved 0
  112. debug1: kex: algorithm: curve25519-sha256@libssh.org
  113. debug1: kex: host key algorithm: ecdsa-sha2-nistp256
  114. debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
  115. debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
  116. debug3: send packet: type 30
  117. debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
  118. debug3: receive packet: type 31
  119. debug1: Server host key: ecdsa-sha2-nistp256 SHA256:1MfReEPXf/ResuMnmG/nEgimB5TxF1AcA2j4LBHBbTU
  120. debug3: put_host_port: [132.211.132.122]:5555
  121. debug3: put_host_port: [westeros.hec.ca]:5555
  122. debug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts"
  123. debug3: record_hostkey: found key type RSA in file /root/.ssh/known_hosts:2
  124. debug3: record_hostkey: found key type ECDSA in file /root/.ssh/known_hosts:4
  125. debug3: record_hostkey: found key type ED25519 in file /root/.ssh/known_hosts:6
  126. debug3: load_hostkeys: loaded 3 keys from [westeros.hec.ca]:5555
  127. debug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts"
  128. debug1: Host '[westeros.hec.ca]:5555' is known and matches the ECDSA host key.
  129. debug1: Found key in /root/.ssh/known_hosts:4
  130. Warning: Permanently added the ECDSA host key for IP address '[132.211.132.122]:5555' to the list of known hosts.
  131. debug3: send packet: type 21
  132. debug2: set_newkeys: mode 1
  133. debug1: rekey after 134217728 blocks
  134. debug1: SSH2_MSG_NEWKEYS sent
  135. debug1: expecting SSH2_MSG_NEWKEYS
  136. debug3: receive packet: type 21
  137. debug1: SSH2_MSG_NEWKEYS received
  138. debug2: set_newkeys: mode 0
  139. debug1: rekey after 134217728 blocks
  140. debug2: key: (stdin) (0x55ff2d56d630), agent
  141. debug2: key: /root/.ssh/id_rsa ((nil))
  142. debug2: key: /root/.ssh/id_dsa ((nil))
  143. debug2: key: /root/.ssh/id_ecdsa ((nil))
  144. debug2: key: /root/.ssh/id_ed25519 ((nil))
  145. debug3: send packet: type 5
  146. debug3: receive packet: type 7
  147. debug1: SSH2_MSG_EXT_INFO received
  148. debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
  149. debug3: receive packet: type 6
  150. debug2: service_accept: ssh-userauth
  151. debug1: SSH2_MSG_SERVICE_ACCEPT received
  152. debug3: send packet: type 50
  153. debug3: receive packet: type 51
  154. debug1: Authentications that can continue: publickey,keyboard-interactive
  155. debug3: start over, passed a different list publickey,keyboard-interactive
  156. debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
  157. debug3: authmethod_lookup publickey
  158. debug3: remaining preferred: keyboard-interactive,password
  159. debug3: authmethod_is_enabled publickey
  160. debug1: Next authentication method: publickey
  161. debug1: Offering RSA public key: (stdin)
  162. debug3: send_pubkey_test
  163. debug3: send packet: type 50
  164. debug2: we sent a publickey packet, wait for reply
  165. debug3: receive packet: type 51
  166. debug1: Authentications that can continue: publickey,keyboard-interactive
  167. debug1: Trying private key: /root/.ssh/id_rsa
  168. debug3: no such identity: /root/.ssh/id_rsa: No such file or directory
  169. debug1: Trying private key: /root/.ssh/id_dsa
  170. debug3: no such identity: /root/.ssh/id_dsa: No such file or directory
  171. debug1: Trying private key: /root/.ssh/id_ecdsa
  172. debug3: no such identity: /root/.ssh/id_ecdsa: No such file or directory
  173. debug1: Trying private key: /root/.ssh/id_ed25519
  174. debug3: no such identity: /root/.ssh/id_ed25519: No such file or directory
  175. debug2: we did not send a packet, disable method
  176. debug3: authmethod_lookup keyboard-interactive
  177. debug3: remaining preferred: password
  178. debug3: authmethod_is_enabled keyboard-interactive
  179. debug1: Next authentication method: keyboard-interactive
  180. debug2: userauth_kbdint
  181. debug3: send packet: type 50
  182. debug2: we sent a keyboard-interactive packet, wait for reply
  183. debug3: receive packet: type 60
  184. debug2: input_userauth_info_req
  185. debug2: input_userauth_info_req: num_prompts 1
  186. debug1: read_passphrase: can't open /dev/tty: No such device or address
  187. debug3: send packet: type 61
  188. debug3: receive packet: type 51
  189. debug1: Authentications that can continue: publickey,keyboard-interactive
  190. debug2: userauth_kbdint
  191. debug3: send packet: type 50
  192. debug2: we sent a keyboard-interactive packet, wait for reply
  193. debug3: receive packet: type 60
  194. debug2: input_userauth_info_req
  195. debug2: input_userauth_info_req: num_prompts 1
  196. debug1: read_passphrase: can't open /dev/tty: No such device or address
  197. debug3: send packet: type 61
  198. debug3: receive packet: type 51
  199. debug1: Authentications that can continue: publickey,keyboard-interactive
  200. debug2: userauth_kbdint
  201. debug3: send packet: type 50
  202. debug2: we sent a keyboard-interactive packet, wait for reply
  203. debug3: receive packet: type 60
  204. debug2: input_userauth_info_req
  205. debug2: input_userauth_info_req: num_prompts 1
  206. debug1: read_passphrase: can't open /dev/tty: No such device or address
  207. debug3: send packet: type 61
  208. debug3: receive packet: type 51
  209. debug1: Authentications that can continue: publickey,keyboard-interactive
  210. debug2: we did not send a packet, disable method
  211. debug1: No more authentication methods to try.
  212. Permission denied (publickey,keyboard-interactive).
  213. ERROR: Job failed: exit code 1
  214.  
  215. debug3: authmethod_lookup publickey
  216. debug3: remaining preferred: keyboard-interactive,password
  217. debug3: authmethod_is_enabled publickey
  218. debug1: Next authentication method: publickey
  219. debug1: Offering RSA public key: (stdin)
  220. debug3: send_pubkey_test
  221. debug3: send packet: type 50
  222. debug2: we sent a publickey packet, wait for reply
  223. debug3: receive packet: type 51
  224. debug1: Authentications that can continue: publickey,keyboard-interactive
  225. debug1: Trying private key: /root/.ssh/id_rsa
  226. debug3: no such identity: /root/.ssh/id_rsa: No such file or directory
  227. debug1: Trying private key: /root/.ssh/id_dsa
  228. debug3: no such identity: /root/.ssh/id_dsa: No such file or directory
  229. debug1: Trying private key: /root/.ssh/id_ecdsa
  230. debug3: no such identity: /root/.ssh/id_ecdsa: No such file or directory
  231. debug1: Trying private key: /root/.ssh/id_ed25519
  232. debug3: no such identity: /root/.ssh/id_ed25519: No such file or directory
  233. debug2: we did not send a packet, disable method
  234. debug3: authmethod_lookup keyboard-interactive
  235. debug3: remaining preferred: password
Add Comment
Please, Sign In to add comment