Advertisement
Guest User

Untitled

a guest
May 16th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. dpkg --get-selections | grep openssh
  2.  
  3. ssh-keygen to generate keys
  4. Generating public/private rsa key pair.
  5. Enter file in which to save the key (/home/ubuntu/.ssh/id_rsa):
  6. /home/ubuntu/.ssh/id_rsa already exists.
  7. Overwrite (y/n)? y
  8. Enter passphrase (empty for no passphrase):
  9. Enter same passphrase again:
  10. Your identification has been saved in /home/ubuntu/.ssh/id_rsa.
  11. Your public key has been saved in /home/ubuntu/.ssh/id_rsa.pub.
  12. The key fingerprint is:
  13. SHA256:PWp6Z7apDhYGz+Uv2uu9bCUj4JabRLq9u5kWQymqlY0 ubuntu@ubuntu
  14. The key's randomart image is:
  15. +---[RSA 2048]----+
  16. | |
  17. | |
  18. | . .. |
  19. | .+=o . |
  20. | = *=oS o |
  21. | E o.B..oo.. |
  22. | o =o=+..+ |
  23. |. ..=O.+=. |
  24. | .OB*B*o |
  25. +----[SHA256]-----+
  26.  
  27. Directory: carsonDir
  28. Username: carson
  29. sudo useradd -d /home/carsonDir -m carson
  30.  
  31. sudo passwd carson
  32. Enter new UNIX password: password
  33. Retype new UNIX password: password
  34. passwd: password updated successfully
  35.  
  36. cd /home/carsonDir
  37. sudo mkdir .ssh
  38.  
  39. ifconfig:
  40. 10.97.85.6
  41.  
  42. when client calls command firefox:
  43.  
  44. ubuntu@ubuntu:/home/carsonDir$ ps aux | grep firefox
  45. carson 12218 12.0 2.8 1065948 235360 pts/18 Sl+ 13:04 0:03 /usr/lib/firefox/firefox
  46. ubuntu 12338 0.0 0.0 21292 932 pts/2 S+ 13:04 0:00 grep --color=auto firefox
  47.  
  48. ubuntu@ubuntu:/home/carsonDir$ ps aux | grep firefox
  49. carson 12345 41.6 2.4 869224 196216 pts/18 Rl+ 13:04 0:01 /usr/lib/firefox/firefox
  50. carson 12403 18.0 0.9 612672 80840 pts/18 Sl+ 13:04 0:00 /usr/lib/firefox/plugin-container -greomni /usr/lib/firefox/omni.ja
  51.  
  52. after client closes firefox:
  53.  
  54. ubuntu@ubuntu:/home/carsonDir$ ps aux | grep firefox
  55. ubuntu 12344 0.0 0.0 21292 936 pts/2 S+ 13:04 0:00 grep --color=auto firefox
  56.  
  57.  
  58. So the client has connected to the server.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement