Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo useradd -p '$1$********' hbruijn
- sudo su - hbruijn
- mkdir -p ~/.ssh
- chmod 0700 ~/.ssh
- echo 'from="10.80.0.0/14,192.168.1.2" ssh-rsa AAAAB3NzaC1y***...***== hbruijn@serverfault' >> ~/.ssh/authorized_keys
- chmod 0600 ~/.ssh/authorized_keys
- hbruijn ALL=(ALL) ALL
- Match user hbruijn
- PasswordAuthentication no
- 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
- 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
- export HISTSIZE=99999999999
- export HISTFILESIZE=99999999999
- export HISTIGNORE="w:ls:ls -lart:dmesg:history:fg"
- export HISTTIMEFORMAT='%F %H:%M:%S '
- shopt -s histappend
- $ script session.log
- Script started, file is session.log
- $ ls
- file1 session.log
- exit
- Script done, file is session.log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement