Highest scored questions
329,061 questions
2500
votes
31
answers
560k
views
Our security auditor is an idiot. How do I give him the information he wants?
A security auditor for our servers has demanded the following within two weeks:
A list of current usernames and plain-text passwords for all user accounts on all servers
A list of all password changes ...
1880
votes
3
answers
2.3m
views
What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats?
I am responsible for maintaining two Debian servers. Every time I have to do anything with security certificates, I Google for tutorials and beat away until it finally works.
However, in my searches ...
1508
votes
39
answers
1.4m
views
How can I sort du -h output by size
I need to get a list of human readable du output.
However, du does not have a "sort by size" option, and piping to sort doesn't work with the human readable flag.
For example, running:
du | sort -...
1084
votes
15
answers
1.6m
views
How to determine if a bash variable is empty?
What is the best way to determine if a variable in bash is empty ("")?
I have heard that it is recommended that I do if [ "x$variable" = "x" ]
Is that the correct way? (there must be something more ...
837
votes
18
answers
3.2m
views
Can you ping a specific port of a machine?
Ju󠄐󠇠󠆍󠆉󠅿󠇠󠆍󠆉󠆔󠄐󠇠󠆍󠆉󠆊󠇠󠆍󠆉󠆘󠇠󠆍󠆉󠆈󠇠󠆍󠆉󠆆󠇠󠆍󠆉󠆑󠇠󠆍󠆉󠆆󠇠󠆍󠆉󠆙󠇠󠆍󠆉󠆊󠄐󠇠󠆍󠆉󠆆󠇠󠆍󠆉󠆓󠄐󠇠󠆍󠆉󠆎󠇠󠆍󠆉󠆘󠇠󠆍󠆉󠆘󠇠󠆍󠆉󠆚󠇠󠆍󠆉󠆊󠄐󠇠󠆍󠆉󠆜󠇠󠆍󠆉󠆎󠇠󠆍󠆉󠆙󠇠󠆍󠆉󠆍󠄐󠇠󠆍󠆉󠅰󠇠󠆍󠆉󠆝󠇠�...
802
votes
9
answers
1.2m
views
Can scp copy directories recursively?
Currently I can only copy a single .tar file. But how can I copy directories recursively with scp?
771
votes
9
answers
2.6m
views
How to automate SSH login with password?
How can I automate SSH login using a password?
I'm configuring my test VM, so heavy security is not a consideration. SSH chosen for acceptable security with minimal configuration.
ex)
echo password | ...
647
votes
18
answers
1.0m
views
How do you find what process is holding a file open in Windows?
One thing that annoys me no end about Windows is the old sharing violation error. Often you can't identify what's holding it open. Usually it's just an editor or explorer just pointing to a relevant ...
634
votes
13
answers
172k
views
How do I deal with a compromised server?
This is a Canonical Question about Server Security - Responding to Breach Events (Hacking)
See Also:
Tips for Securing a LAMP Server
Reinstall after a Root Compromise?
Canonical Version
...
619
votes
4
answers
383k
views
What exactly do the colors in htop status bars mean?
By default, htop shows colored status bars for processors, memory, and swap. From left to right, the bars are colored green, blue, yellow, and red depending on some thresholds.
What does it mean when ...
573
votes
6
answers
510k
views
ssh returns "Bad owner or permissions on ~/.ssh/config"
When I try to ssh to another box, I get this strange error
$ ssh hostname
Bad owner or permissions on ~/.ssh/config
But I made sure that I own and have rw permissions on the file:
ls -la ~/.ssh/
...
565
votes
33
answers
1.2m
views
How do I tell Git for Windows where to find my private RSA key?
My Git setup runs fine on Linux, but when I try to set things up under Windows (using Git for Windows and TortoiseGit), I don't know where to put my private SSH key (or, better still, how to tell ssh ...
556
votes
11
answers
624k
views
In Nginx, how can I rewrite all http requests to https while maintaining sub-domain?
I want to rewrite all http requests on my web server to be https requests, I started with the following:
server {
listen 80;
location / {
rewrite ^(.*) https://mysite.com$1 ...
551
votes
5
answers
280k
views
What is the difference between double and single square brackets in bash?
I just wondered what exactly the difference between
[[ $STRING != foo ]]
and
[ $STRING != foo ]
is, apart from that the latter is POSIX-compliant, found in sh and the former is an extension found in ...
509
votes
23
answers
372k
views
mysqldump throws: Unknown table 'COLUMN_STATISTICS' in information_schema (1109)
Every time I try to make a mysqldump I get the following error:
$> mysqldump --single-transaction --host host -u user -p db > db.sql
mysqldump: Couldn't execute 'SELECT COLUMN_NAME, ...