Shell script to connect to Remote server using ssh (Fedora Linux)

1
24

SSH ( Secure shell ) is the best and secure way to access a remote server from client side

but its a long exercise to type the entire thing each time when we connect

Here the importance of shell script plays

Steps

From your home directory type vi server_name

]#vi server_name

On the editor window type

ssh root@125.17.243.254

ssh root@10.10.10.10

Save and Exit (Esc + wq)

here root is the user name and 10.10.10.10 is   ip address of the server

upon exit give server_name execute permission

]#chmod 777 server_name

Now the file is ready to execute

Now connect to the server with a single command

]#./server_name

enter password of root in 10.10.10.10:

Enter the password and you ll see the prompt for root at 10.10.10.10

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here