Advertisement
Guest User

Untitled

a guest
Mar 14th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1. ⌘ ~ ❯ ssh -v -J gatekeeper@gateway ubuntu@node -i ~/.ssh/id_rsa
  2. OpenSSH_7.3p1, LibreSSL 2.4.1
  3. [...]
  4. debug1: Authentication succeeded (publickey).
  5. Authenticated to gateway ([35.156.248.245]:22).
  6. debug1: channel_connect_stdio_fwd node:22
  7. debug1: channel 0: new [stdio-forward]
  8. debug1: getpeername failed: Bad file descriptor
  9. debug1: Requesting no-more-sessions@openssh.com
  10. debug1: Entering interactive session.
  11. debug1: pledge: network
  12. debug1: client_input_global_request: rtype keepalive@openssh.com want_reply 1
  13. debug1: client_input_global_request: rtype keepalive@openssh.com want_reply 1
  14. debug1: client_input_global_request: rtype keepalive@openssh.com want_reply 1
  15. debug1: client_input_global_request: rtype keepalive@openssh.com want_reply 1
  16. debug1: client_input_global_request: rtype keepalive@openssh.com want_reply 1
  17. debug1: client_input_global_request: rtype keepalive@openssh.com want_reply 1
  18. debug1: client_input_global_request: rtype keepalive@openssh.com want_reply 1
  19. debug1: client_input_global_request: rtype keepalive@openssh.com want_reply 1
  20. channel 0: open failed: connect failed: Connection timed out
  21. stdio forwarding failed
  22. ssh_exchange_identification: Connection closed by remote host
  23.  
  24. admin@gateway:~$ grep -e "[7669]" -e "[7739]" /var/log/auth.log
  25. Mar 13 11:01:20 gateway sshd[7669]: Set /proc/self/oom_score_adj to 0
  26. Mar 13 11:01:20 gateway sshd[7669]: rexec line 32: Deprecated option PermitBlacklistedKeys
  27. Mar 13 11:01:20 gateway sshd[7669]: Connection from <laptop-out-ip> port 62113 on <gateway-ip> port 22
  28. Mar 13 11:01:20 gateway sshd[7669]: Postponed publickey for gatekeeper from <laptop-out-ip> port 62113 ssh2 [preauth]
  29. Mar 13 11:01:20 gateway sshd[7669]: Accepted publickey for gatekeeper from <laptop-out-ip> port 62113 ssh2: RSA 8d:7e:9c:53:11:c9:4d:b3:67:7b:ae:04:03:8f:e2:71
  30. Mar 13 11:01:20 gateway sshd[7669]: pam_unix(sshd:session): session opened for user gatekeeper by (uid=0)
  31. Mar 13 11:01:20 gateway sshd[7669]: User child is on pid 7739
  32. Mar 13 11:03:27 gateway sshd[7739]: error: connect_to <node-ip> port 22: failed.
  33. Mar 13 11:03:28 gateway sshd[7739]: Connection closed by <laptop-out-ip>
  34. Mar 13 11:03:28 gateway sshd[7739]: Transferred: sent 2252, received 2864 bytes
  35. Mar 13 11:03:28 gateway sshd[7739]: Closing connection to <laptop-out-ip> port 62113
  36. Mar 13 11:03:28 gateway sshd[7669]: pam_unix(sshd:session): session closed for user gatekeeper
  37.  
  38. # ssh service configuration
  39.  
  40. AcceptEnv
  41. AddressFamily inet
  42. AllowAgentForwarding yes
  43. AllowGroups
  44. AllowTcpForwarding no
  45. AllowUsers gatekeeper
  46. AuthorizedKeysFile %h/.ssh/authorized_keys
  47. ChallengeResponseAuthentication no
  48. Ciphers aes128-ctr,aes192-ctr,aes256-ctr
  49. ClientAliveCountMax 3
  50. ClientAliveInterval 15
  51. Compression delayed
  52. DenyGroups
  53. DenyUsers
  54. GSSAPIAuthentication no
  55. GatewayPorts no
  56. HostKey /etc/ssh/ssh_host_dsa_key
  57. HostKey /etc/ssh/ssh_host_rsa_key
  58. HostKey /etc/ssh/ssh_host_ecdsa_key
  59. HostbasedAuthentication no
  60. KerberosAuthentication no
  61. ListenAddress 0.0.0.0:22
  62. LogLevel VERBOSE
  63. LoginGraceTime 60
  64. MaxAuthTries 6
  65. MaxSessions 10
  66. MaxStartups 30
  67. PasswordAuthentication no
  68. PermitBlacklistedKeys no
  69. PermitRootLogin no
  70. PermitTunnel no
  71. PermitUserEnvironment no
  72. PidFile /var/run/sshd.pid
  73. PrintLastLog yes
  74. PrintMotd no
  75. Protocol 2
  76. PubkeyAuthentication yes
  77. RSAAuthentication no
  78. RhostsRSAAuthentication no
  79. StrictModes yes
  80. SyslogFacility AUTH
  81. TCPKeepAlive yes
  82. UseDNS no
  83. UseLogin no
  84. UsePAM yes
  85. UsePrivilegeSeparation yes
  86. X11Forwarding no
  87.  
  88. Match User gatekeeper
  89. AllowTcpForwarding yes
  90. AllowAgentForwarding no
  91. X11Forwarding no
  92.  
  93. error: connect_to <node-ip> port 22: failed.
  94.  
  95. ssh-keygen -t rsa
  96.  
  97. ssh-copy-id -i .ssh/id_rsa.pub gatekeeper@gateway
  98.  
  99. ssh-copy-id -i .ssh/id_rsa.pub ubuntu@node
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement