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 firstname.lastname@example.org
The authenticity of host ‘dommain.com (188.8.131.52)’ 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 ‘email@example.com’”
and check to make sure that only the key(s) you wanted were added.
Create a new PostgreSQL user
Example of how to create a user in PostgreSQL copied directly from:
$ createuser -P -s -e joe
Enter password for new role: xyzzy
Enter it again: xyzzy
CREATE ROLE joe PASSWORD ‘md5b5f5ba1a423792b526f799ae4eb3d59e’ SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
-P prompts for password
-s specifies superuser
-e echoes the commands
Upgrade User Permissions in PostgreSQL
ALTER USER name WITH SUPERUSER;
“All matter originates and exists only by virtue of a force… We must assume behind this force the existence of a conscious and intelligent Mind. This Mind is the matrix of all matter.”
Check I/O in Linux
[root@wks1 ~]# hdparm -tT /dev/sda