Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. sudo useradd -p '$1$********' hbruijn
  2.  
  3. sudo su - hbruijn
  4. mkdir -p ~/.ssh
  5. chmod 0700 ~/.ssh
  6. echo 'from="10.80.0.0/14,192.168.1.2" ssh-rsa AAAAB3NzaC1y***...***== hbruijn@serverfault' >> ~/.ssh/authorized_keys
  7. chmod 0600 ~/.ssh/authorized_keys
  8.  
  9. hbruijn ALL=(ALL) ALL
  10.  
  11. Match user hbruijn
  12. PasswordAuthentication no
  13.  
  14. Sep 26 11:00:03 hostname sudo: hbruijn : TTY=pts/0 ; PWD=/home/hbruijn ; USER=jboss ; COMMAND=sudoedit /usr/share/jbossas/domain/configuration/domain.xml
  15. Sep 26 11:00:34 hostname sudo: hbruijn : TTY=pts/0 ; PWD=/home/hbruijn ; USER=root ; COMMAND=/usr/bin/tail -n 5 /var/log/messages
  16.  
  17. export HISTSIZE=99999999999
  18. export HISTFILESIZE=99999999999
  19. export HISTIGNORE="w:ls:ls -lart:dmesg:history:fg"
  20. export HISTTIMEFORMAT='%F %H:%M:%S '
  21. shopt -s histappend
  22.  
  23. $ script session.log
  24. Script started, file is session.log
  25. $ ls
  26. file1 session.log
  27. exit
  28. Script done, file is session.log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement