Page tree
Skip to end of metadata
Go to start of metadata

.ssh key setup


politick:~/.ssh$ ls -la
total 20
drwx------ 2 politick politick 4096 Dec 7 05:37 .
drwxr-xr-x 7 politick politick 4096 Dec 7 05:21 ..
-rw-r----- 1 politick politick 437 Dec 7 05:21 authorized_keys
-rw------- 1 politick politick 1766 Dec 7 05:38 id_rsa
-rw-r--r-- 1 politick politick 888 Dec 6 19:09 known_hosts

paste  public key in ~/.ssh/authorized_keys

paste  private key in ~/.ssh/id_rsa

ssh-keygen -p -f id_rsa   to set or change passphrase on private key

known_hosts manages itself.  Only put the private key on the server you ssh FROM, no need to put the private key on the remote server you SSH to.  Limit the number of computers to the minimum (usually only 1).


You probably want to set in  /etc/ssh/sshd_config:

PasswordAuthentication no


Nginx

Instead of service nginx restart:

service nginx reload


Emptying the /boot of a Linux system:


Automatically:

apt autoremove --purge

Manually:

First check your kernel version, so you won't delete the in-use kernel image, running:

uname -r

Now run this command for a list of installed kernels:

dpkg --list 'linux-image*' | grep ^ii

and delete the kernels you don't want anymore by running this:

sudo apt-get remove linux-image-VERSION

Replace VERSION with the version of the kernel you want to remove.

When you're done removing the older kernels, you can run this to remove ever packages you won't need anymore:

sudo apt-get autoremove

And finally you can run this to update grub kernel list:

sudo update-grub
  • No labels
Write a comment…