There are two steps.
1. Creating the SSH key on the local machine
2. Transferring the public key to the remote host and appending it to ~/.ssh/authorized_keys (which requires access to the remote machine)
$ ssh-keygen -t rsa
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'srandomart image is:
+--[ RSA 2048]----+
| . |
| o . .|
| E o o.|
| ...oo |
| .S .+ +o.|
| . . .=....|
| . . + o. .|
| ..+ |
The easiest way to upload is
If ssh-copy-id is not available, do this instead:
$ ssh USER@REMOTE_HOST \
"cat >> ~/.ssh/authorized_keys" < ~/.ssh/id_rsa.pub
To test that it works:
$ ssh USER@REMOTE_HOST uname
Adding execute permission for yourself
$ chmod u+x <filename>
Change a files owner and group-owner
$ chown olga:olga <filename>
Recursively for all directories and files (as seen from current directory)
$ chown -R olga:olga *
Manual page for a command
$ man <cmd>
$ man ps
View running processes
$ ps aux
$ ps aux | grep olga
Kill a process
$ kill <PID>
If process is stubborn
$ kill -9 <PID>
$ sudo apt install <package-name>
GUI frontend to apt:
$ sudo synaptic
If you have downloaded a <xxx>.deb file
$ sudo dpkg -i <xxx>.deb
A guide to how to create project level code templates:
After adding SSH key to GitHub account, change remotes as described here.
fzf – Fuzzy Finder: https://github.com/junegunn/fzf
Essential System Tools: pet – command-line snippet manager
Graph generation tool: Mermaid – https://github.com/mermaidjs/mermaid.cli
Simple UML diagrams. There is also an Atom plugin.
Find number of cores: https://www.ostechnix.com/find-number-cpu-cores-commandline-linux/