Most Popular
1500 questions
344
votes
27 answers
Can I automatically add a new host to known_hosts?
Here's my situation: I'm setting up a test harness that will, from a central client, launch a number of virtual machine instances and then execute commands on them via ssh. The virtual machines will have previously unused hostnames and IP…
gareth_bowles
- 9,247
342
votes
5 answers
How to send ctrl+alt+del using Remote Desktop?
How can I send ctrl+alt+del to a remote computer over Remote Desktop?
For example, if I wanted to change the local admin password on a remote PC using a Remote Desktop connection, it would be helpful to be able to send the ctrl+alt+del key sequence…
T. Marshall
- 3,523
342
votes
4 answers
What are the functional differences between .profile .bash_profile and .bashrc
What are the functional differences between the .profile, .bash_profile and .bashrc files?
lollercoaster
- 3,585
339
votes
18 answers
Copying a large directory tree locally? cp or rsync?
I have to copy a large directory tree, about 1.8 TB. It's all local. Out of habit I'd use rsync, however I wonder if there's much point, and if I should rather use cp.
I'm worried about permissions and uid/gid, since they have to be preserved in the…
Amandasaurus
- 32,281
- 69
- 194
- 263
325
votes
2 answers
Create a public SSH key from the private key?
Let's suppose I have a SSH key, but I've deleted the public key part. I have the private key part. Is there some way I can regenerate the public key part?
Amandasaurus
- 32,281
- 69
- 194
- 263
319
votes
27 answers
100% uptime for a web application
We received an interesting "requirement" from a client today.
They want 100% uptime with off-site failover on a web application. From our web application's viewpoint, this isn't an issue. It was designed to be able to scale out across multiple…
NotMe
- 3,782
313
votes
5 answers
Nginx reverse proxy + URL rewrite
Nginx is running on port 80, and I'm using it to reverse proxy URLs with path /foo to port 3200 this way:
location /foo {
proxy_pass http://localhost:3200;
proxy_redirect off;
proxy_set_header …
jeffreyveon
- 3,295
313
votes
8 answers
How to bind MySQL server to more than one IP address?
Is there a secret way to bind MySQL to more than one IP address?
As far as I can see the bind-address parameter in the my.cnf does not support more than one IP and you can't have it more than once.
BlaM
- 3,936
310
votes
14 answers
What's the command-line utility in Windows to do a reverse DNS look-up?
Is there a built-in command line tool that will do reverse DNS look-ups in Windows? I.e., something like w.x.y.z => mycomputername
I've tried:
nslookup: seems to be forward look-up only.
host: doesn't exist
dig: also doesn't exist.
I…
alastairs
- 3,235
305
votes
8 answers
Check if port is open or closed on a Linux server?
How can I check if a port is listening on a Linux server?
James Anderson
- 3,217
304
votes
17 answers
How to Unban an IP properly with Fail2Ban
I'm using Fail2Ban on a server and I'm wondering how to unban an IP properly.
I know I can work with IPTables directly: iptables -D fail2ban-ssh
But is there not a way to do it with the fail2ban-client?
In the manuals it states something…
psp
- 3,303
300
votes
4 answers
How do I select which Apache MPM to use?
This is a Canonical Question about selecting the right Apache httpd MPM.
I'm a little confused between the different MPMs offered by Apache - 'worker', 'event', 'prefork', etc.
What are the major differences between them, and how can I decide…
Tiffany Walker
- 6,691
291
votes
4 answers
Why do I need Nginx and something like Gunicorn?
I'm looking for an overly simplified answer to the following question. I'm trying to build a foundational understanding of how Nginx works alongside something like Gunicorn.
Do I need both Nginx and something like Gunicorn to deploy Django apps on…
a.m.
- 3,015
288
votes
15 answers
Finding out what user Apache is running as?
I want to secure a file upload directory on my server as described beautifully here, but I have one problem before I can follow these instructions. I don't know what user Apache is running as.
I've found a suggestion that you can look in httpd.conf…
Anna
286
votes
5 answers
What's the difference between IP address 0.0.0.0 and 127.0.0.1?
I know that 127.0.0.1 ~ 127.255.255.254 are the loopback IP addresses for most modern operating systems, and these IP addresses can be used to refer to our own computer.
But what's 0.0.0.0? It seems it also refers to the local computer, so what's…
Jichao
- 3,057