Most Popular

1500 questions
146
votes
3 answers

ssh-keygen does not create RSA private key

I'm trying to create a private key and having an issue. When I use ssh-keygen -t rsa -b 4096 -C "your_email@example.com", I get a private key in the following format. -----BEGIN OPENSSH PRIVATE…
Moon
  • 2,143
146
votes
3 answers

How can I upgrade to Java 1.8 on an Amazon Linux Server?

I tried sudo yum update but it just keeps java "1.7.0_75". I need 1.8 for it to work with another application but can't figure out how to upgrade it. Do I need to manually install it somehow? There's not much information on this on the internet as…
K_dar
  • 1,463
146
votes
3 answers

Difference between OpenSSH internal-sftp and sftp-server

Why are there two ways to setup SFTP with OpenSSH and when to use which? Is there any difference between them? I mean the first one is using a lib from OpenSSH and the second one says "use the internal", so it is also OpenSSH? Subsystem sftp…
Denny Crane
  • 1,643
145
votes
8 answers

connect() failed (111: Connection refused) while connecting to upstream

I'm experiencing 502 Gateway errors when accessing a PHP file in a directory (http://example.com/dev/index.php). The logs simply says this: 2011/09/30 23:47:54 [error] 31160#0: *35 connect() failed (111: Connection refused) while connecting to…
MacMac
  • 2,141
  • 10
  • 31
  • 38
145
votes
6 answers

How to see active connections and "current activity" in PostgreSQL 8.4

I'm investigating an issue with DB connections being left open indefinitely, causing problems on the DB server. How do I see currently open connections to a PostgreSQL server, particularly those using a specific database? Ideally I'd like to see…
EMP
  • 5,162
144
votes
7 answers

In a PowerShell script, how can I check if I'm running with administrator privileges?

In a PowerShell script, how can I check if I'm running with administrator privileges?
144
votes
7 answers

Where to check log of sendmail?

I can't send out emails, need to look into the logs, but where is the log?
Shore
144
votes
4 answers

Can you help me with my capacity planning?

This is a canonical question about capacity planning Related: How do you do load testing and capacity planning for web sites? How do you do load testing and capacity planning for databases? I have a question regarding capacity planning. Can the…
voretaq7
  • 80,391
144
votes
8 answers

In Windows, using the command line, how do you check if a remote port is open?

What is a simple way in Windows to test if traffic gets through to a specific port on a remote machine?
Matt
  • 1,621
144
votes
4 answers

Is my password compromised because I forgot to hit Enter after ssh username?

I've just tried logging into a Fedora (release 13 Goddard) server using SSH (PuTTY, Windows). For some reason the Enter after typing my username didn't go through and I typed in my password and hit Enter again. I only realized my mistake when the…
143
votes
11 answers

Run Oracle SQL script and exit from sqlplus.exe via command prompt

I would like to run an Oracle script through SQL Plus via a Windows command prompt. The script does not contain an "exit" command, but I would still like SQL Plus to exit, returning control to the command prompt on completion of the script. My goal…
JoshL
  • 1,625
143
votes
9 answers

Find out symbolic link target via command line

Say that I setup a symbolic link: ln -s /root/Public/mytextfile.txt /root/Public/myothertextfile.txt is there a way to see what the target of myothertextfile.txt is using the command line?
Jared
  • 1,577
143
votes
2 answers

How can I verify if TLS 1.2 is supported on a remote web server from the RHEL/CentOS shell?

I'm on CentOS 5.9. I'd like to determine from the linux shell if a remote web server specifically supports TLS 1.2 (as opposed to TLS 1.0). Is there an easy way to check for that? I'm not seeing a related option on openssl but perhaps I'm…
Mike B
  • 12,016
143
votes
4 answers

robocopy transfer file and not folder

I'm trying to use robocopy to transfer a single file from one location to another but robocopy seems to think I'm always specifying a folder. Here is an example: robocopy "c:\transfer_this.txt" "z:\transferred.txt" But I get this error…
Bill McKay
142
votes
8 answers

How to list Apache enabled modules?

Is there a command that list all enabled Apache modules?
supercobra
  • 1,575