Quick Access

User login

Who's online

There are currently 0 users and 2 guests online.

Visitors Map

Site Counter

  • Site Counter: 492986
  • Registered Users: 57239
  • Published Nodes: 330
  • Your IP: 108.162.219.129
  • Since: 2008-09-09

Link Exchange

BlogCatalog Blog Directory
Technology Business Directory - BTS LocalTop stories
Click here
         SecGeeks
       Megapanzer

Live Traffic Info

SSH passwordless login and sudo user

Password less SSH login to another server can be very useful when you want to configure a remote backup server or when migrating servers. For enabling this you need to have openSSH installed on the server. Here is a tutorial on how to configure password less SSH login to server ‘mars’ from server ‘earth’

1. Login to earth as root.

2. Run the command ssh-keygen -t rsa
If the key already exists you can either go to step 3 or you can generate a new key by overwriting existing key (see image). It would be better to overwrite the existing key if you did not generate it.




3. Change directory to /root/.ssh/

[email protected]:~# cd /root/.ssh/
[email protected]:~/.ssh#

4. Copy the contents of the file id_rsa.pub to the directory /root/.ssh/authorized_keys
scp -P id_rsa.pub [email protected]_server_IP:/root/.ssh/authorized_keys

5. You will be able to login to the remote server ‘mars’ by typing ssh [email protected]_server_IP -p without password now

Creating Sudo user to login as root:

1. Login to server as root

2. Create a new user by using the command

[email protected]:~# useradd user

3. Assign a password for the user by using the command
[email protected]:~# passwd user

4. Add the user to the admin group in /etc/groups

[email protected]:~# vi /etc/groups
admin:x:121:user1,user2

Technorati Tags:Technorati Tags:
Your rating: None Average: 3.8 (13 votes)

nice one bro by Anonymous (not verified)

Search

Loading

Sponsered links

Bookmark Us!

Share/Save

Page Rank

Quotes

First say to yourself what you would be; and then do what you have to do.

Explore Tags

Follow Us