KB: Linux Cmds
Linux KB:
GREP:
- grep -rH "<search string>" /<path> --include *.pub
- grep rH "<search string>" /<path>
JOURNALCTL:
- https://www.loggly.com/ultimate-guide/using-journalctl/
- journalctl -u sshd
- journalctl -u sshd -r -n 1 #Reverse journal log
- journalctl -u sshd -f #Live Monitor
SSH:
Copying SSH pub key between users:
This is just one of a few different ways to do this. I am assuming you've just created your user and it has sudo access.
mkdir /home/<user>/.ssh
chmod 700 /home/<user>/.ssh
cp /root/.ssh/authorized_keys /home/<user>/.ssh/authorized_keys
chmod 600 /home/<user>/.ssh/authorized_keys
chown -R <user>:<user> /home/<user>/.ssh
Comments
Post a Comment