Posts Tagged ‘bash’

Sec: Import and Verify GPG

gpg –keyserver –recv-key 139A768E

gpg –list-sigs 139A768E

gpg –verify
Then paste it.

Sec: Generate a SSH Key on a Linux Bash CLI in 2 Steps


1. On each machine type ssh and make a connection with your regular password. This will create a .ssh dir in your home directory with the proper perms.

2. On your primary machine where you want your secret keys to live (let’s say hurly), type:

ssh-keygen -t dsa
This will prompt you for a secret passphrase. If this is your primary identity key, make sure to use a good passphrase. If this works right you will get two files called id_dsa and in your.ssh dir. Note: it is possible to just press the enter key when prompted for a passphrase, which will make a key with no passphrase. This is a Bad Idea ™ for an identity key, so don’t do it! See below for uses of keys without passphrases. 
  • scp ~/.ssh/ burly:.ssh/authorized_keys2
  • ssh-agent sh -c 'ssh-add < /dev/null && bash'
  • ssh burly
where burly is the server you’re connecting to

Quick-Tip: Display Internal IP Address on Linux Bash CLI in 1 Line

ifconfig en0 | grep inet | cut -d : -f4 | awk ‘{print $2}’

Quick-Tip: Connect to a ParAccell (aka PaDB) DB from Bash in 1 Line

psql -h –username paraccel hsa -p 5439

Quick Tip: How to Free Up Resources for Big Data Scripts in Linux by Checking Processes, Killing Duplicates, Tailing Log

ps -ef
sudo kill -2600 1982 999
tail -f myscript.log
Where “2600”, “1982”, and “999” represent the PPID’s you wish to kill, which you looked up with the ps -ef command.

Optionally filter the process list by changing the first command to:

ps -ef | grep -i keyword
Stackoverflow Solutions

Just started! Have not answered any questions.