Logging into another UNIX box

Hello All,

Is there any UNIX or KSH Command to login to an linux/unix server and execute a command and then come back to the original server where u have executed the command.

For Example:
-------------------------------------------------------
SServer1 - Source Server.

DServer2 - Destination Server.

SServer1:/home/->

Login into DServer2 using an UNIX or KSH Command and then execute a command like "uname -a" and exit to the Source Server.

SServer1:/home/->
-------------------------------------------------------

I am not sure whether the FTP will work for this.

Any ideas or suggestions are welcome.

Thanks

Rahul

use ssh and setup a cert so pasword is not required.

Then you can eiasly automate this in a script.

SSH/SCP Cert Create

1. Suppose the domain name of your server is server, and your login name loginname. 

2. On the client, generate a public and private key. 
ssh-keygen -C loginname@server -t dsa

When asked for a password, simply press return. 

The private key is stored in ~/.ssh/id_dsa, and the public key in ~/.ssh/id_dsa.pub. 

Never give the private key away!

3. Copy the public file to the server with 
scp ~/.ssh/id_dsa.pub loginname@server:~/

4. Login on the server with 
ssh loginname@server

append the copied file to ~/.ssh/authorized_keys with

cat ~/id_dsa.pub >>~/.ssh/authorized_keys

5. If you want to enable this features on other servers, just repeat step 3 on each of the servers. 

That�s it! If you have done everything correctly, the next time you login via SSH or use CVS over SSH, you will not need to enter a password yet you have a secure connection.