Password-less SSH Login to Ubuntu Server

On the client:

=========================================================================================
socrat@socrat-laptop ~/.ssh $ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/socrat/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/socrat/.ssh/id_rsa.
Your public key has been saved in /home/socrat/.ssh/id_rsa.pub.
The key fingerprint is:
cc:c3:7f:c1:ec:f7:4d:83:37:5b:ef:f1:1b:c1:6d:75 socrat@socrat-laptop
The key’s randomart image is:
+–[ RSA 2048]—-+
| |
| |
| E|
| + o . +|
| S + oo|
| o . ….|
| . o..*o|
| . ..o@|
| +B|
+—————–+
socrat@socrat-laptop ~/.ssh $ ssh-copy-id socrat@ubuntu-server
The authenticity of host ‘ubuntu-server (192.168.0.1)’ can’t be established.
ECDSA key fingerprint is a4:d7:2f:17:b9:35:ec:cf:bf:db:ff:39:32:08:8b:8b.
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: 2 key(s) remain to be installed — if you are prompted now it is to install the new keys
socrat@ubuntu-server’s password:

Number of key(s) added: 2

Now try logging into the machine, with: “ssh ‘socrat@ubuntu-server'”
and check to make sure that only the key(s) you wanted were added.

socrat@socrat-laptop ~/.ssh $ ssh socrat@ubuntu-server

Welcome to Ubuntu
=========================================================================================

That’s it, Have Fun!

Source: http://askubuntu.com/questions/46930/how-can-i-set-up-password-less-ssh-login

Posted in Linux, Ubuntu | Tagged , , , , , , | Leave a comment

How to make use of KVM snapshots via “virsh”

This is a very interesting article that contained everything I needed about KVM snapshots. It listed all the “virsh” command parameters for snapshots with an excellent explanation of each one:

https://xdev.me/article/How_to_use_KVM_snapshots

Posted in Virtualization | Tagged , , , , , | Leave a comment

How to configure network settings in CentOS (from dhcp to static)

It’s a bit different from what we’re used to do in Ubuntu, here are the instructions, assuming our network interface is eth0:

  1. Take a backup from the “/etc/sysconfig/network-scripts/ifcfg-eth0” file, e.g. by the following command: “cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0.bak”
  2. Open the “/etc/sysconfig/network-scripts/ifcfg-eth0” file for editing using vi or similar and do the following:
    1. change BOOTPROTO from “dhcp” to “static”
    2. Add the following lines replacing the “X” with your values:
      1. IPADDR=XXX.XXX.XXX.XXX
      2. NETMASK=XXX.XXX.XXX.XXX
      3. GATEWAY=XXX.XXX.XXX.XXX
      4. DNS1=XXX.XXX.XXX.XXX
        Note: You can add more “DNS1” entries to add additional DNS servers
  3. Restart the network:
    “/etc/init.d/networking restart”

That’s it! Enjoy!

Source: http://www.howtoforge.com/linux-basics-set-a-static-ip-on-centos

Posted in Linux | Tagged , , , , , , , | Leave a comment

How to use Tor with any Linux App

I currently prefer Chrome to Firefox, and I wanted to use Tor without having to download the whole tor browser bundle. Surprisingly, that was a piece of cake!

All I did was the following:

“sudo apt-get install tor”

It runs by default on port 9050, so all you have to do now is configure any of your apps to use Socks5 proxy and pointing them at localhost with port 9050.

Note: I used Proxy SwitchySharp on Chrome to quickly move between a direct connection and a Tor one.

Note: It’s by the way added to your system startup apps, so you can use bum or similar to disable its autostart

Posted in Linux | Tagged , , , | Leave a comment

How to change desktop icon text color on Linux Mint 17 Cinnamon Edition

I know, it’s an extremely stupid issue!

Here is the solution:

Just go to /usr/share/themes/Adwaita/gtk-3.0/ and add the following text to the file named gtk.css:

.nemo-desktop.nemo-canvas-item {
color: #FFFFFF;
text-shadow: 1px 1px @desktop_item_text_shadow;
}

.nemo-desktop.nemo-canvas-item:selected {
background-color: alpha(#D64A38, 0.9);
background-image: none;
color: #FFFFFF;
text-shadow: none;
}

You can replace Adwaita with whatever theme you’re using and the color codes to whichever colors you choose (#FFFFFF is for white, which is perfect for me)

Credit goes to herunotenchi on https://github.com/linuxmint/Cinnamon/issues/3226

Posted in Uncategorized | 9 Comments