Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.29 KB | None | 0 0
  1. ~$ ls -lhd $HOME
  2. drwx------. 28 mrkelly mrkelly 4.0K May 13 16:23 /mnt/driveB/mrkelly
  3. ~$ ls -lhd $HOME/.ssh
  4. drwx------. 2 mrkelly mrkelly 4.0K May 13 15:37 /mnt/driveB/mrkelly/.ssh
  5. ~$ ls -lh $HOME/.ssh
  6. total 24K
  7. -rwx------. 1 mrkelly mrkelly 1.7K May 13 15:37 authorized_keys
  8. -rwx------. 1 mrkelly mrkelly 668 May 13 15:20 id_dsa
  9. -rwx------. 1 mrkelly mrkelly 625 May 13 15:20 id_dsa.pub
  10. -rwx------. 1 mrkelly mrkelly 1.7K May 13 15:11 id_rsa
  11. -rwx------. 1 mrkelly mrkelly 417 May 13 15:11 id_rsa.pub
  12. -rwx------. 1 mrkelly mrkelly 980 May 13 14:57 known_hosts
  13. /$ ll -d /
  14. dr-xr-xr-x. 17 root root 4.0K May 14 12:21 /
  15. /$ ll -d /mnt
  16. drwxr-xr-x. 4 root root 4.0K Nov 18 04:33 /mnt
  17. /$ ll -d /mnt/driveB
  18. drwxr-xr-x. 4 root root 4.0K May 13 17:31 /mnt/driveB
  19. ~$ uname -a
  20. Linux action-jackson.stanford.edu 3.19.7-200.fc21.x86_64 #1 SMP Thu May 7 22:00:21 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
  21.  
  22. ~$ sudo systemctl status selinux
  23. ● selinux.service
  24. Loaded: not-found (Reason: No such file or directory)
  25. Active: inactive (dead)
  26.  
  27. ~$ sudo /usr/sbin/sshd -d
  28. debug1: sshd version OpenSSH_6.6.1, OpenSSL 1.0.1k-fips 8 Jan 2015
  29. debug1: key_parse_private2: missing begin marker
  30. debug1: read PEM private key done: type RSA
  31. debug1: private host key: #0 type 1 RSA
  32. debug1: key_parse_private2: missing begin marker
  33. debug1: read PEM private key done: type ECDSA
  34. debug1: private host key: #1 type 3 ECDSA
  35. debug1: private host key: #2 type 4 ED25519
  36. debug1: rexec_argv[0]='/usr/sbin/sshd'
  37. debug1: rexec_argv[1]='-d'
  38. Set /proc/self/oom_score_adj from 0 to -1000
  39. debug1: Bind to port 22 on 0.0.0.0.
  40. Server listening on 0.0.0.0 port 22.
  41. debug1: Bind to port 22 on ::.
  42. Server listening on :: port 22.
  43.  
  44. debug1: Server will not fork when running in debugging mode.
  45. debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
  46. debug1: inetd sockets after dupping: 3, 3
  47. Connection from 127.0.0.1 port 49966 on 127.0.0.1 port 22
  48. debug1: Client protocol version 2.0; client software version OpenSSH_6.6.1
  49. debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
  50. debug1: Enabling compatibility mode for protocol 2.0
  51. debug1: Local version string SSH-2.0-OpenSSH_6.6.1
  52. debug1: SELinux support enabled [preauth]
  53. debug1: ssh_selinux_change_context: setting context from 'unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023' to 'unconfined_u:unconfined_r:sshd_net_t:s0-s0:c0.c1023' [preauth]
  54. debug1: permanently_set_uid: 74/74 [preauth]
  55. debug1: list_hostkey_types: ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
  56. debug1: SSH2_MSG_KEXINIT sent [preauth]
  57. debug1: SSH2_MSG_KEXINIT received [preauth]
  58. debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none [preauth]
  59. debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none [preauth]
  60. debug1: kex: curve25519-sha256@libssh.org need=16 dh_need=16 [preauth]
  61. debug1: kex: curve25519-sha256@libssh.org need=16 dh_need=16 [preauth]
  62. debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
  63. debug1: SSH2_MSG_NEWKEYS sent [preauth]
  64. debug1: expecting SSH2_MSG_NEWKEYS [preauth]
  65. debug1: SSH2_MSG_NEWKEYS received [preauth]
  66. debug1: KEX done [preauth]
  67. debug1: userauth-request for user mrkelly service ssh-connection method none [preauth]
  68. debug1: attempt 0 failures 0 [preauth]
  69. debug1: PAM: initializing for "mrkelly"
  70. debug1: PAM: setting PAM_RHOST to "localhost.localdomain"
  71. debug1: PAM: setting PAM_TTY to "ssh"
  72. debug1: userauth-request for user mrkelly service ssh-connection method publickey [preauth]
  73. debug1: attempt 1 failures 0 [preauth]
  74. debug1: test whether pkalg/pkblob are acceptable [preauth]
  75. debug1: temporarily_use_uid: 1000/1000 (e=0/0)
  76. debug1: trying public key file /mnt/driveB/mrkelly/.ssh/authorized_keys
  77. debug1: fd 4 clearing O_NONBLOCK
  78. Found matching RSA key: d7:9e:aa:54:63:d7:2d:87:d3:b1:0e:83:3b:70:27:d4
  79. debug1: restore_uid: 0/0
  80. Postponed publickey for mrkelly from 127.0.0.1 port 49966 ssh2 [preauth]
  81. debug1: userauth-request for user mrkelly service ssh-connection method publickey [preauth]
  82. debug1: attempt 2 failures 0 [preauth]
  83. debug1: temporarily_use_uid: 1000/1000 (e=0/0)
  84. debug1: trying public key file /mnt/driveB/mrkelly/.ssh/authorized_keys
  85. debug1: fd 4 clearing O_NONBLOCK
  86. Found matching RSA key: d7:9e:aa:54:63:d7:2d:87:d3:b1:0e:83:3b:70:27:d4
  87. debug1: restore_uid: 0/0
  88. debug1: ssh_rsa_verify: signature correct
  89. debug1: do_pam_account: called
  90. Accepted publickey for mrkelly from 127.0.0.1 port 49966 ssh2: RSA d7:9e:aa:54:63:d7:2d:87:d3:b1:0e:83:3b:70:27:d4
  91. debug1: monitor_child_preauth: mrkelly has been authenticated by privileged process
  92. debug1: monitor_read_log: child log fd closed
  93. debug1: SELinux support enabled
  94. debug1: PAM: establishing credentials
  95. User child is on pid 8196
  96. debug1: PAM: establishing credentials
  97. debug1: permanently_set_uid: 1000/1000
  98. debug1: Entering interactive session for SSH2.
  99. debug1: server_init_dispatch_20
  100. debug1: server_input_channel_open: ctype session rchan 0 win 1048576 max 16384
  101. debug1: input_session_request
  102. debug1: channel 0: new [server-session]
  103. debug1: session_new: session 0
  104. debug1: session_open: channel 0
  105. debug1: session_open: session 0: link with channel 0
  106. debug1: server_input_channel_open: confirm session
  107. debug1: server_input_global_request: rtype no-more-sessions@openssh.com want_reply 0
  108. debug1: server_input_channel_req: channel 0 request x11-req reply 1
  109. debug1: session_by_channel: session 0 channel 0
  110. debug1: session_input_channel_req: session 0 req x11-req
  111. debug1: channel 1: new [X11 inet listener]
  112. debug1: channel 2: new [X11 inet listener]
  113. debug1: server_input_channel_req: channel 0 request pty-req reply 1
  114. debug1: session_by_channel: session 0 channel 0
  115. debug1: session_input_channel_req: session 0 req pty-req
  116. debug1: Allocating pty.
  117. debug1: session_new: session 0
  118. debug1: SELinux support enabled
  119. debug1: session_pty_req: session 0 alloc /dev/pts/4
  120. debug1: server_input_channel_req: channel 0 request env reply 0
  121. debug1: session_by_channel: session 0 channel 0
  122. debug1: session_input_channel_req: session 0 req env
  123. debug1: server_input_channel_req: channel 0 request env reply 0
  124. debug1: session_by_channel: session 0 channel 0
  125. debug1: session_input_channel_req: session 0 req env
  126. debug1: server_input_channel_req: channel 0 request shell reply 1
  127. debug1: session_by_channel: session 0 channel 0
  128. debug1: session_input_channel_req: session 0 req shell
  129. Starting session: shell on pts/4 for mrkelly from 127.0.0.1 port 49966
  130. debug1: Setting controlling tty using TIOCSCTTY.
  131.  
  132. ~$ ssh -v `whoami`@localhost
  133. OpenSSH_6.6.1, OpenSSL 1.0.1k-fips 8 Jan 2015
  134. debug1: Reading configuration data /etc/ssh/ssh_config
  135. debug1: /etc/ssh/ssh_config line 56: Applying options for *
  136. debug1: Connecting to localhost [127.0.0.1] port 22.
  137. debug1: Connection established.
  138. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_rsa type 1
  139. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_rsa-cert type -1
  140. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_dsa type 2
  141. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_dsa-cert type -1
  142. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_ecdsa type -1
  143. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_ecdsa-cert type -1
  144. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_ed25519 type -1
  145. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_ed25519-cert type -1
  146. debug1: Enabling compatibility mode for protocol 2.0
  147. debug1: Local version string SSH-2.0-OpenSSH_6.6.1
  148. debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
  149. debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
  150. debug1: SSH2_MSG_KEXINIT sent
  151. debug1: SSH2_MSG_KEXINIT received
  152. debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
  153. debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
  154. debug1: kex: curve25519-sha256@libssh.org need=16 dh_need=16
  155. debug1: kex: curve25519-sha256@libssh.org need=16 dh_need=16
  156. debug1: sending SSH2_MSG_KEX_ECDH_INIT
  157. debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
  158. debug1: Server host key: ECDSA 8d:cb:f2:94:da:97:7b:0d:ee:e6:bb:8e:3f:41:ae:d8
  159. debug1: Host 'localhost' is known and matches the ECDSA host key.
  160. debug1: Found key in /mnt/driveB/mrkelly/.ssh/known_hosts:3
  161. debug1: ssh_ecdsa_verify: signature correct
  162. debug1: SSH2_MSG_NEWKEYS sent
  163. debug1: expecting SSH2_MSG_NEWKEYS
  164. debug1: SSH2_MSG_NEWKEYS received
  165. debug1: Roaming not allowed by server
  166. debug1: SSH2_MSG_SERVICE_REQUEST sent
  167. debug1: SSH2_MSG_SERVICE_ACCEPT received
  168. debug1: Authentications that can continue: publickey,password,keyboard-interactive
  169. debug1: Next authentication method: publickey
  170. debug1: Offering RSA public key: /mnt/driveB/mrkelly/.ssh/id_rsa
  171. debug1: Server accepts key: pkalg ssh-rsa blen 279
  172. debug1: key_parse_private2: missing begin marker
  173. debug1: read PEM private key done: type RSA
  174. debug1: Authentication succeeded (publickey).
  175. Authenticated to localhost ([127.0.0.1]:22).
  176. debug1: channel 0: new [client-session]
  177. debug1: Requesting no-more-sessions@openssh.com
  178. debug1: Entering interactive session.
  179. debug1: Requesting X11 forwarding with authentication spoofing.
  180. debug1: Sending environment.
  181. debug1: Sending env LANGUAGE =
  182. debug1: Sending env LANG = en_US.UTF-8
  183. Last login: Wed May 13 15:58:17 2015 from localhost.localdomain
  184. Environment:
  185. LANGUAGE=
  186. LANG=en_US.UTF-8
  187. USER=mrkelly
  188. LOGNAME=mrkelly
  189. HOME=/mnt/driveB/mrkelly
  190. PATH=/usr/local/bin:/usr/bin
  191. MAIL=/var/mail/mrkelly
  192. SHELL=/bin/zsh
  193. SSH_CLIENT=127.0.0.1 49967 22
  194. SSH_CONNECTION=127.0.0.1 49967 127.0.0.1 22
  195. SSH_TTY=/dev/pts/4
  196. TERM=xterm-256color
  197. DISPLAY=localhost:11.0
  198. SELINUX_ROLE_REQUESTED=
  199. SELINUX_LEVEL_REQUESTED=
  200. SELINUX_USE_CURRENT_RANGE=
  201. XDG_SESSION_ID=21
  202. XDG_RUNTIME_DIR=/run/user/1000
  203. XDG_SEAT=seat0
  204. XDG_VTNR=1
  205. Running /usr/bin/xauth remove unix:11.0
  206. /usr/bin/xauth add unix:11.0 MIT-MAGIC-COOKIE-1 62951eb22f06d56df8189ee23126a19e
  207.  
  208. sudo systemctl start sshd
  209.  
  210. ~$ ssh -v `whoami`@localhost
  211. OpenSSH_6.6.1, OpenSSL 1.0.1k-fips 8 Jan 2015
  212. debug1: Reading configuration data /etc/ssh/ssh_config
  213. debug1: /etc/ssh/ssh_config line 56: Applying options for *
  214. debug1: Connecting to localhost [127.0.0.1] port 22.
  215. debug1: Connection established.
  216. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_rsa type 1
  217. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_rsa-cert type -1
  218. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_dsa type 2
  219. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_dsa-cert type -1
  220. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_ecdsa type -1
  221. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_ecdsa-cert type -1
  222. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_ed25519 type -1
  223. debug1: identity file /mnt/driveB/mrkelly/.ssh/id_ed25519-cert type -1
  224. debug1: Enabling compatibility mode for protocol 2.0
  225. debug1: Local version string SSH-2.0-OpenSSH_6.6.1
  226. debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
  227. debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
  228. debug1: SSH2_MSG_KEXINIT sent
  229. debug1: SSH2_MSG_KEXINIT received
  230. debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
  231. debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
  232. debug1: kex: curve25519-sha256@libssh.org need=16 dh_need=16
  233. debug1: kex: curve25519-sha256@libssh.org need=16 dh_need=16
  234. debug1: sending SSH2_MSG_KEX_ECDH_INIT
  235. debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
  236. debug1: Server host key: ECDSA 8d:cb:f2:94:da:97:7b:0d:ee:e6:bb:8e:3f:41:ae:d8
  237. debug1: Host 'localhost' is known and matches the ECDSA host key.
  238. debug1: Found key in /mnt/driveB/mrkelly/.ssh/known_hosts:3
  239. debug1: ssh_ecdsa_verify: signature correct
  240. debug1: SSH2_MSG_NEWKEYS sent
  241. debug1: expecting SSH2_MSG_NEWKEYS
  242. debug1: SSH2_MSG_NEWKEYS received
  243. debug1: Roaming not allowed by server
  244. debug1: SSH2_MSG_SERVICE_REQUEST sent
  245. debug1: SSH2_MSG_SERVICE_ACCEPT received
  246. debug1: Authentications that can continue: publickey,password,keyboard-interactive
  247. debug1: Next authentication method: publickey
  248. debug1: Offering RSA public key: /mnt/driveB/mrkelly/.ssh/id_rsa
  249. debug1: Authentications that can continue: publickey,password,keyboard-interactive
  250. debug1: Offering DSA public key: /mnt/driveB/mrkelly/.ssh/id_dsa
  251. debug1: Authentications that can continue: publickey,password,keyboard-interactive
  252. debug1: Trying private key: /mnt/driveB/mrkelly/.ssh/id_ecdsa
  253. debug1: Trying private key: /mnt/driveB/mrkelly/.ssh/id_ed25519
  254. debug1: Next authentication method: keyboard-interactive
  255. Password:
  256.  
  257. /usr/sbin/sshd -D
  258.  
  259. /usr/shbin/sshd
  260.  
  261. debug1: key_parse_private2: missing begin marker
  262.  
  263. sudo semanage fcontext -a -e /home /path/to/custom/homedir/container/on/server
  264.  
  265. sudo restorecon -R /path/to/custom/homedir/container/on/server
  266.  
  267. sudo setsebool -P use_nfs_home_dirs on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement