The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




Thread: Remote server
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 01-07-2009
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,909
Quote:
Originally Posted by edisonantus View Post
Could you please give me a command?

Since I am running a script i do not want the remote server to prompt for a password.
The command is simply ssh. It is used like:
Code:
ssh username@hostname 'command to execute'
If you omit any command to be executed, you get an interactive shell.

Like Lazydog says, logging in without a password is something you must set up in advance. This involves generating a public/private key pair and placing it on the server so the server and client can recognize each other. Once this is done, you will be able to run the command without any special parameters and login without a password. Hunt for ~/.ssh/authorized_keys in ssh's manpage.