Want more features on Pastebin? Sign Up, it's FREE!
Guest

ssh-agent trouble

By: TacticalCode on Jun 6th, 2013  |  syntax: Bash  |  size: 7.45 KB  |  views: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. damon@DamonVirtual ~ $ ssh-add -l
  2. The agent has no identities.
  3. damon@DamonVirtual ~ $ ssh-keygen
  4. Generating public/private rsa key pair.
  5. Enter file in which to save the key (/home/damon/.ssh/id_rsa):
  6. Created directory '/home/damon/.ssh'.
  7. Enter passphrase (empty for no passphrase):
  8. Enter same passphrase again:
  9. Your identification has been saved in /home/damon/.ssh/id_rsa.
  10. Your public key has been saved in /home/damon/.ssh/id_rsa.pub.
  11. The key fingerprint is:
  12. 43:8f:87:98:9f:1c:51:e7:b3:91:02:34:13:34:44:90 damon@DamonVirtual
  13. The key's randomart image is:
  14. +--[ RSA 2048]----+
  15. |      .B@.. .    |
  16. |      E  * o .   |
  17. |        o . =    |
  18. |       + = . +   |
  19. |      o S o .    |
  20. |       o =       |
  21. |        +        |
  22. |                 |
  23. |                 |
  24. +-----------------+
  25. damon@DamonVirtual ~ $ ssh-add -l
  26. 2048 43:8f:87:98:9f:1c:51:e7:b3:91:02:34:13:34:44:90 damon@DamonVirtual (RSA)
  27. damon@DamonVirtual ~ $ ssh-add -L
  28. ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCcAS41N/hU4Pa1lyFFJHd8DA75ATnnqqvY+CtqZW8pY+xaTpeNXBIRBJeZCgDqDIDuJ4KIiXNS/z7OfIPtx17/pynuGoGLunpGB5lFs2hlfinvor9NaFdRedzNpBwNQ34fFNqwH3ka13O98GqEhjsyD3Pwprdlsbyyzk9FmJwCwXx8lkcZF/Ec1o7eW8VutCZZ8fQAGJ0pvyYiQCxXN+32zdtbcZbDtxd5B287bWi8cjtTr1mBtTOJGR7G6n/HC4HzEfe3+ggricMewnG+vOff2MaIaj5Zz3sv4qwzRmjJ/4KY4xmoCvd1omb/rfat8QZlhKzPHfqfownQ3P/S+Lnn damon@DamonVirtual
  29. damon@DamonVirtual ~ $ openssl pkcs8 -topk8 -in .ssh/id_rsa -out .ssh/id_rsa_enc -v2 des3
  30. Enter Encryption Password:
  31. Verifying - Enter Encryption Password:
  32. damon@DamonVirtual ~ $ chmod 600 .ssh/id_rsa_enc
  33. damon@DamonVirtual ~ $ ssh-add -l
  34. 2048 43:8f:87:98:9f:1c:51:e7:b3:91:02:34:13:34:44:90 damon@DamonVirtual (RSA)
  35. damon@DamonVirtual ~ $ cp .ssh/id_rsa.pub .ssh/id_rsa_enc.pub
  36. damon@DamonVirtual ~ $ ssh-add -l
  37. 2048 43:8f:87:98:9f:1c:51:e7:b3:91:02:34:13:34:44:90 damon@DamonVirtual (RSA)
  38. 2048 43:8f:87:98:9f:1c:51:e7:b3:91:02:34:13:34:44:90 damon@DamonVirtual (RSA)
  39. damon@DamonVirtual ~ $ ssh-add -L
  40. ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCcAS41N/hU4Pa1lyFFJHd8DA75ATnnqqvY+CtqZW8pY+xaTpeNXBIRBJeZCgDqDIDuJ4KIiXNS/z7OfIPtx17/pynuGoGLunpGB5lFs2hlfinvor9NaFdRedzNpBwNQ34fFNqwH3ka13O98GqEhjsyD3Pwprdlsbyyzk9FmJwCwXx8lkcZF/Ec1o7eW8VutCZZ8fQAGJ0pvyYiQCxXN+32zdtbcZbDtxd5B287bWi8cjtTr1mBtTOJGR7G6n/HC4HzEfe3+ggricMewnG+vOff2MaIaj5Zz3sv4qwzRmjJ/4KY4xmoCvd1omb/rfat8QZlhKzPHfqfownQ3P/S+Lnn damon@DamonVirtual
  41. ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCcAS41N/hU4Pa1lyFFJHd8DA75ATnnqqvY+CtqZW8pY+xaTpeNXBIRBJeZCgDqDIDuJ4KIiXNS/z7OfIPtx17/pynuGoGLunpGB5lFs2hlfinvor9NaFdRedzNpBwNQ34fFNqwH3ka13O98GqEhjsyD3Pwprdlsbyyzk9FmJwCwXx8lkcZF/Ec1o7eW8VutCZZ8fQAGJ0pvyYiQCxXN+32zdtbcZbDtxd5B287bWi8cjtTr1mBtTOJGR7G6n/HC4HzEfe3+ggricMewnG+vOff2MaIaj5Zz3sv4qwzRmjJ/4KY4xmoCvd1omb/rfat8QZlhKzPHfqfownQ3P/S+Lnn damon@DamonVirtual
  42. damon@DamonVirtual ~ $ mv .ssh/id_rsa .
  43. damon@DamonVirtual ~ $ ssh-add -l
  44. 2048 43:8f:87:98:9f:1c:51:e7:b3:91:02:34:13:34:44:90 damon@DamonVirtual (RSA)
  45. 2048 43:8f:87:98:9f:1c:51:e7:b3:91:02:34:13:34:44:90 damon@DamonVirtual (RSA)
  46. damon@DamonVirtual ~ $ ssh-add -L
  47. ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCcAS41N/hU4Pa1lyFFJHd8DA75ATnnqqvY+CtqZW8pY+xaTpeNXBIRBJeZCgDqDIDuJ4KIiXNS/z7OfIPtx17/pynuGoGLunpGB5lFs2hlfinvor9NaFdRedzNpBwNQ34fFNqwH3ka13O98GqEhjsyD3Pwprdlsbyyzk9FmJwCwXx8lkcZF/Ec1o7eW8VutCZZ8fQAGJ0pvyYiQCxXN+32zdtbcZbDtxd5B287bWi8cjtTr1mBtTOJGR7G6n/HC4HzEfe3+ggricMewnG+vOff2MaIaj5Zz3sv4qwzRmjJ/4KY4xmoCvd1omb/rfat8QZlhKzPHfqfownQ3P/S+Lnn damon@DamonVirtual
  48. ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCcAS41N/hU4Pa1lyFFJHd8DA75ATnnqqvY+CtqZW8pY+xaTpeNXBIRBJeZCgDqDIDuJ4KIiXNS/z7OfIPtx17/pynuGoGLunpGB5lFs2hlfinvor9NaFdRedzNpBwNQ34fFNqwH3ka13O98GqEhjsyD3Pwprdlsbyyzk9FmJwCwXx8lkcZF/Ec1o7eW8VutCZZ8fQAGJ0pvyYiQCxXN+32zdtbcZbDtxd5B287bWi8cjtTr1mBtTOJGR7G6n/HC4HzEfe3+ggricMewnG+vOff2MaIaj5Zz3sv4qwzRmjJ/4KY4xmoCvd1omb/rfat8QZlhKzPHfqfownQ3P/S+Lnn damon@DamonVirtual
  49. damon@DamonVirtual ~ $ mv .ssh/id_rsa.pub .
  50. damon@DamonVirtual ~ $ ssh-add -l
  51. 2048 43:8f:87:98:9f:1c:51:e7:b3:91:02:34:13:34:44:90 damon@DamonVirtual (RSA)
  52. damon@DamonVirtual ~ $ ssh-add -L
  53. ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCcAS41N/hU4Pa1lyFFJHd8DA75ATnnqqvY+CtqZW8pY+xaTpeNXBIRBJeZCgDqDIDuJ4KIiXNS/z7OfIPtx17/pynuGoGLunpGB5lFs2hlfinvor9NaFdRedzNpBwNQ34fFNqwH3ka13O98GqEhjsyD3Pwprdlsbyyzk9FmJwCwXx8lkcZF/Ec1o7eW8VutCZZ8fQAGJ0pvyYiQCxXN+32zdtbcZbDtxd5B287bWi8cjtTr1mBtTOJGR7G6n/HC4HzEfe3+ggricMewnG+vOff2MaIaj5Zz3sv4qwzRmjJ/4KY4xmoCvd1omb/rfat8QZlhKzPHfqfownQ3P/S+Lnn damon@DamonVirtual
  54. damon@DamonVirtual ~ $ ssh -v 192.168.178.38
  55. OpenSSH_6.1p1 Debian-4, OpenSSL 1.0.1c 10 May 2012
  56. debug1: Reading configuration data /etc/ssh/ssh_config
  57. debug1: /etc/ssh/ssh_config line 19: Applying options for *
  58. debug1: Connecting to 192.168.178.38 [192.168.178.38] port 22.
  59. debug1: Connection established.
  60. debug1: identity file /home/damon/.ssh/id_rsa type -1
  61. debug1: identity file /home/damon/.ssh/id_rsa-cert type -1
  62. debug1: identity file /home/damon/.ssh/id_dsa type -1
  63. debug1: identity file /home/damon/.ssh/id_dsa-cert type -1
  64. debug1: identity file /home/damon/.ssh/id_ecdsa type -1
  65. debug1: identity file /home/damon/.ssh/id_ecdsa-cert type -1
  66. debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-3ubuntu1
  67. debug1: match: OpenSSH_6.0p1 Debian-3ubuntu1 pat OpenSSH*
  68. debug1: Enabling compatibility mode for protocol 2.0
  69. debug1: Local version string SSH-2.0-OpenSSH_6.1p1 Debian-4
  70. debug1: SSH2_MSG_KEXINIT sent
  71. debug1: SSH2_MSG_KEXINIT received
  72. debug1: kex: server->client aes128-ctr hmac-md5 none
  73. debug1: kex: client->server aes128-ctr hmac-md5 none
  74. debug1: sending SSH2_MSG_KEX_ECDH_INIT
  75. debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
  76. debug1: Server host key: ECDSA d0:42:c3:a4:bb:2e:f0:cd:38:c1:32:d5:a5:ac:4c:d5
  77. The authenticity of host '192.168.178.38 (192.168.178.38)' can't be established.
  78. ECDSA key fingerprint is d0:42:c3:a4:bb:2e:f0:cd:38:c1:32:d5:a5:ac:4c:d5.
  79. Are you sure you want to continue connecting (yes/no)? yes
  80. Warning: Permanently added '192.168.178.38' (ECDSA) to the list of known hosts.
  81. debug1: ssh_ecdsa_verify: signature correct
  82. debug1: SSH2_MSG_NEWKEYS sent
  83. debug1: expecting SSH2_MSG_NEWKEYS
  84. debug1: SSH2_MSG_NEWKEYS received
  85. debug1: Roaming not allowed by server
  86. debug1: SSH2_MSG_SERVICE_REQUEST sent
  87. debug1: SSH2_MSG_SERVICE_ACCEPT received
  88. debug1: Authentications that can continue: publickey
  89. debug1: Next authentication method: publickey
  90. debug1: Offering RSA public key: damon@DamonVirtual
  91. debug1: Server accepts key: pkalg ssh-rsa blen 279
  92. Agent admitted failure to sign using the key.
  93. debug1: Trying private key: /home/damon/.ssh/id_rsa
  94. debug1: Trying private key: /home/damon/.ssh/id_dsa
  95. debug1: Trying private key: /home/damon/.ssh/id_ecdsa
  96. debug1: No more authentication methods to try.
  97. Permission denied (publickey).
  98. damon@DamonVirtual ~ $ mv .ssh/id_rsa_enc . && mv .ssh/id_rsa_enc.pub .
  99. damon@DamonVirtual ~ $ ssh-add -l
  100. The agent has no identities.
  101. damon@DamonVirtual ~ $ mv id_rsa .ssh/ && mv id_rsa.pub .ssh/
  102. damon@DamonVirtual ~ $ ssh-add -l
  103. 2048 43:8f:87:98:9f:1c:51:e7:b3:91:02:34:13:34:44:90 damon@DamonVirtual (RSA)
  104. damon@DamonVirtual ~ $ ssh-add -L
  105. ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCcAS41N/hU4Pa1lyFFJHd8DA75ATnnqqvY+CtqZW8pY+xaTpeNXBIRBJeZCgDqDIDuJ4KIiXNS/z7OfIPtx17/pynuGoGLunpGB5lFs2hlfinvor9NaFdRedzNpBwNQ34fFNqwH3ka13O98GqEhjsyD3Pwprdlsbyyzk9FmJwCwXx8lkcZF/Ec1o7eW8VutCZZ8fQAGJ0pvyYiQCxXN+32zdtbcZbDtxd5B287bWi8cjtTr1mBtTOJGR7G6n/HC4HzEfe3+ggricMewnG+vOff2MaIaj5Zz3sv4qwzRmjJ/4KY4xmoCvd1omb/rfat8QZlhKzPHfqfownQ3P/S+Lnn damon@DamonVirtual
  106. damon@DamonVirtual ~ $ ssh 192.168.178.38
  107. Last login: Thu Jun  6 05:34:45 2013 from damon.local
  108. damon@Damon ~ $ exit
clone this paste RAW Paste Data