Skip to main content

Key-Based ssh Login


In this post we will look at how to use ssh key-based login.


[pre class="brush:bash"]
ssh-keygen -t rsa

# copy id_rsa.pub to the server. Then
cp authorized_keys authorized_keys_Backup
cat id_rsa.pub >> authorized_keys

# if .ssh or authorized_keys is not available,
#follow the following instructions to create them,
# create the .ssh directory:
mkdir ~/.ssh
# set the right permissions:
chmod 700 ~/.ssh
# create the authorized_keys file:
touch ~/.ssh/authorized_keys

# set the right permissions:
chmod 600 ~/.ssh/authorized_keys

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys[/pre]

Source1, Source2

Comments

Popular posts from this blog

How to Safely Uninstall Python from Mac OS X

Mac Laptops comes with Python pre-installed, but if you install another version of Python probably from www.python.org it might interfere with the default Python installation. Thus it is recommended to install other Python versions through Homebrew or mac ports.

Advantages and Disadvantages of Electro-oculography (EOG)

In the previous post we looked at what is EOG? In this post we will look at the advantages and disadvantages of EOG.

What is your Lucky Colour?

Colours and You
Which colour can bring you luck and enhance your day? This can be identified by calculating the birth number,