Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connect to remote server

Status
Not open for further replies.
Mar 31, 2004
151
US
Could anybody tell how to connect to a different server and execute commands? Let's say I have a
script on server A. I also need to gather same statistics on server b . Can I connect to the other
server? Can I also execute commands like SQLPLUS etc..?
Thanks in advance.
 
I want to perform operations on server b from server a.

Like ls, df, sqlplus etc ...
 
You may consider rlogin, telnet, and depending or your *nix flavor either remsh or rcmd or rsh.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
A sophisticated way is executing the remote command via ssh, because it is encrypted and password-protected.
Previously you must of course install and configure openssh. If properly setup, no password needs to be typed in, because
public keys can be exchanged and copied into ~/.ssh/authorized_keys (if open-ssh is used). If you don't need this comfort, you don't even have to do that, but you'll be asked for the ssh-keyword when issuing the commands.

Assuming ssh is correct configured, a remote command could look like: " # ssh -l root 192.168.2.1 df -k " and you get the result on your terminal.
That's it.

telnet and the "r -commands (rsh etc) shouldn't be used for security-reasons, because everything is transmitted in clear text.

Hope this helps.

regards,
Fred
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top