Security Shell login without password
Page 1 of 1
Security Shell login without password
Setting up passwordless SSH login from machine LOCAL to machine REMOTE using keys carries many benefits. It can enable you to transfer files safely between these machines
even from shell scripts without the need to enter passwords. It can enable you to open an SSH terminal on the remote machine using a simple keyboard shortcut. It can enable you to
mount any accessible folder on the remote machine to a folder on the local machine and access it as a network mount.
But there are also some drawbacks. If anyone gains access to machine LOCAL machine REMOTE is compromised as well, thus reducing the security of the overall network setup. So
you have been warned. Now let's go and set this thing up.
Setting up SSH key authentication
First log in on machine LOCAL as user YOU and generate a pair of authentication keys. Leave an empty passphrase:
Once the keys have been created all you need to do to enable passwordless SSH login on the REMOTE machine is to append the just generated public key to the authorized_keys on
the REMOTE machine.
In case this does not work for you you can try the manual way:
After this step you have completed the setup of passwordless SSH authentication using SSH keys. You can try to login to the REMOTE machine, there should be no password prompt.
even from shell scripts without the need to enter passwords. It can enable you to open an SSH terminal on the remote machine using a simple keyboard shortcut. It can enable you to
mount any accessible folder on the remote machine to a folder on the local machine and access it as a network mount.
But there are also some drawbacks. If anyone gains access to machine LOCAL machine REMOTE is compromised as well, thus reducing the security of the overall network setup. So
you have been warned. Now let's go and set this thing up.
Setting up SSH key authentication
First log in on machine LOCAL as user YOU and generate a pair of authentication keys. Leave an empty passphrase:
- Code:
YOU@LOCAL# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/YOU/.ssh/id_rsa):
Created directory '/home/YOU/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/YOU/.ssh/id_rsa.
Your public key has been saved in /home/YOU/.ssh/id_rsa.pub.
The key fingerprint is:
08:fe:a6:01:3d:f3:65:14:18:7a:10:78:20:3e:de:4e YOU@LOCAL
Once the keys have been created all you need to do to enable passwordless SSH login on the REMOTE machine is to append the just generated public key to the authorized_keys on
the REMOTE machine.
- Code:
YOU@LOCAL# ssh-copy-id -i YOU@REMOTE
YOU@REMOTE's password:
In case this does not work for you you can try the manual way:
- Code:
YOU@LOCAL# cat .ssh/id_rsa.pub | ssh YOU@REMOTE 'cat >> ~/.ssh/authorized_keys'
YOU@REMOTE's password:
After this step you have completed the setup of passwordless SSH authentication using SSH keys. You can try to login to the REMOTE machine, there should be no password prompt.
- Code:
YOU@LOCAL# ssh YOU@REMOTE
YOU@REMOTE#
andry- Moderator
- Posts : 467
Join date : 2010-05-07
Similar topics
» Shell of the Future – Reverse Web Shell Handler for XSS Exploitation
» Login Script
» Shell of the Future v0.9.0.2 is available for download
» How can I access A admin Password?
» HOW TO GET WINDOWS ADMINISTRATOR PASSWORD
» Login Script
» Shell of the Future v0.9.0.2 is available for download
» How can I access A admin Password?
» HOW TO GET WINDOWS ADMINISTRATOR PASSWORD
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|