Solved

Write a script to login to remote server

Posted on 2011-09-30
6
306 Views
Last Modified: 2012-05-12
Need to write a script to login to a remote server.  
say the server IP is 145.28.135.125
0
Comment
Question by:taaz
  • 2
  • 2
  • 2
6 Comments
 
LVL 76

Accepted Solution

by:
arnold earned 500 total points
ID: 36895278
0
 
LVL 13

Expert Comment

by:Hugh McCurdy
ID: 36895280
This is rather difficult to answer without knowing which program you wish to use.  Choices include rlogin, telnet and ssh.  

The script for rlogin and ssh become trivial if you use alternate authentication.  Alternate authentication can be insecure.  (rlogin and telnet can be insecure, period).

By ssh, I mean ssh2.
0
 
LVL 13

Expert Comment

by:Hugh McCurdy
ID: 36895284
I like Arnold's answer.  Should have thought of it myself.  You get to use ssh that way.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:taaz
ID: 36895381
i open the putty and connect to the remote server. and now i want to write a script that when i run it, it connects to the server without me opening the putty and enter the ip address (ssh).

Does the script by Arnold is the solution to that?
0
 

Author Closing Comment

by:taaz
ID: 36895448
thanks
0
 
LVL 76

Expert Comment

by:arnold
ID: 36895612
To be clear, the script in the link is not mine.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now