BSD Quick Tip
When ssh across my systems I often need to step away from the keyboard for a few minutes. This can pose a massive security threat to the system, therefore I think it's important to lock the terminal, this way I don't need to log in/out, nor leave the system insecure.
In all of the BSD's you can use a built-in utility called lock(8). When you use:$ lock
without any options you will be asked to enter a key twice. Then your terminal will be locked for 15 mins, after that time it will become available again.
Options:
To keep your terminal locked until you return, (no 15 minute timeout), use:$ lock -n
To use your normal user password instead of a key you enter use:$ lock -p
Personally I like to use these options all of the time, therefore I add an alias so I only have to type lock.
To Alias `lock -np` to `lock` in csh or tcsh:$ edit ~/.cshrc
add:alias lock lock -np
To Alias lock -np to lock in sh:$ edit ~/.shrc
add:alias lock='lock -np'
Monday, December 03, 2007
Protecting Your Terminal
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment