Most Popular
1500 questions
357
votes
28 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,407
356
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
- 33,461
351
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,613
347
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,635
345
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
- 33,461
330
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,465
330
votes
9 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,467
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…
ChrisLively
- 3,782
318
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,453
- 3
- 18
- 14
317
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,996
316
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,295
302
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,731
299
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,095
294
votes
5 answers
How to remove an image tag in Docker without removing the image itself?
Let's say I want to tag a Docker image, and make a typo. How do I remove the tag without removing the image itself? Neither the manpages nor the Docker documentation mention removing tags.
docker tag 0e5574283393 my-imaj
docker tag 0e5574283393…
Mihai
- 3,376
294
votes
8 answers
command for checking Apache configuration
I'm looking for a command that checks the validity of the config files in Apache server on both Debian and RHEL distros. I need to do this prior to restart, so there will be no downtime.
Sigtran
- 3,043