Happy SysAdmin Day!
Apache Client Certificate Authentication
Below is a useful link for implementing authentication using client certificates and Apache.http://wiki.cacert.org/ApacheServerClientCertificateAuthentication
PostgreSQL Current Process List
To kill a process:
— don’t kill my own connection!
procpid <> pg_backend_pid()
— don’t kill the connections to other databases
AND datname = ‘database_name’;
Or you can just leave off the FROM clause
To view process details:
SELECT datname, procpid, current_query FROM pg_stat_activity;
Why can’t CompTIA reward their certification holders with a certificate that is a normal size? What’s up with the 8.5” x 5.5” dimensions??
Linux Authentication Without a Password
Steps to generate SSH keys on a client machine and transfer to a remote server for authentication:
On Remote Server:
Turn PasswordAuthentication off in /etc/ssh/sshd_config
Restart SSHD Service
On Client Server:
[username@localhost ~]$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/username/.ssh/id_rsa):
Created directory ‘/home/username/.ssh’.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/username/.ssh/id_rsa.
Your public key has been saved in /home/username/.ssh/id_rsa.pub.
The key fingerprint is:
The key’s randomart image is:
—[ RSA 2048]—— | . . .. | |..oo | |
[username@localhost ~]$ cd /home/username/.ssh/
[username@localhost .ssh]$ cp id_rsa.pub authorized_keys
[username@localhost .ssh]$ chmod 700 /home/username/.ssh
[username@localhost .ssh]$ chmod 600 /home/username/.ssh/authorized_keys
[username@localhost .ssh]$ ssh-copy-id email@example.com
The authenticity of host ‘dommain.com (184.108.40.206)’ can’t be established.
RSA key fingerprint is 00:c9:00:be.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed — if you are prompted now it is to install the new keys
Number of key(s) added: 1
Now try logging into the machine, with: “ssh ‘firstname.lastname@example.org’”
and check to make sure that only the key(s) you wanted were added.