SSH uses public-key cryptography to authenticate the remote computer and allow the remote computer to authenticate the user, if necessary.
SSH is typically used to log into a remote machine and execute commands, but it also supports tunneling, forwarding TCP ports and X11 connections; it can transfer files using the associated SFTP or SCP SSH uses the client-server model protocols.
The standard TCP port 22 has been assigned for contacting SSH servers.
An SSH client program is typically used for establishing connections to an SSH daemonoperating systems, including Mac OS X, Linux, FreeBSD, Solaris and OpenVMS. Proprietary, freeware and open source accepting remote connections. Both are commonly present on most modern versions of various levels of complexity and completeness exist.
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 ‘anu’ from server ‘tiger’
1. Login to tiger as root.
2. Run the command
ssh-keygen -t rsaIf 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/
root@tiger:~# cd /root/.ssh/root@tiger:~/.ssh#
4. Copy the contents of the file id_rsa.pub to the directory /root/.ssh/authorized_keys
scp -P id_rsa.pub root@anu_server_IP:/root/.ssh/authorized_keys5. You will be able to login to the remote server ‘anu’ by typing
ssh root@anu_server_IP -p without passwordnow
Creating Sudo user to login as root:
1. Login to server as root
2. Create a new user by using the command
root@server:~# useradd user3. Assign a password for the user by using the command
root@server:~# passwd user4. Add the user to the admin group in /etc/groups
root@server:~# vi /etc/groupsadmin:x:121:user1,user2
0 comments:
Post a Comment