LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-15-2010, 03:51 AM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 36
How can i run script on other server.


Hi guys ,

I want to run a specific command from one server to another.
For example I have a server called A(client) and a server called B(Server).

How would i fire a command on Server(B) while working on Client(A).

One way of doing it is using ssh
"ssh -tq 10.180.8.231 ls -ltr"
but whenever i execute the command it ask for the password. How would i reduce effort of putting password again and again.
Please find the output of following command.
[root@abc .ssh]# find / -name .ssh
/root/.ssh
 
Old 03-15-2010, 03:56 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
You should use public key authentication. There are hundreds of howtos on the web. Here's just one.

http://www.debian-administration.org/articles/152

Cheers,

Evo2.
 
Old 03-15-2010, 05:07 AM   #3
AngTheo789
Member
 
Registered: Sep 2009
Posts: 110

Rep: Reputation: 24
As already said, there are a lot of howto's how to setup your system to handle SSH authentication automatically. Another possibility is (if you have developer experience), to code a small server application that listens on some port on server B, waiting for your remote input, and then executes that input. Such a simple server application design i often included in textbooks on Linux development.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Execute script on local server as normal user to run commands on remote server ALInux Linux - Software 1 01-01-2010 07:30 AM
run a script on Server Startup Suicidal9090 Linux - Newbie 3 11-15-2008 02:02 PM
I want to run script on the server from client machine in windows in a perl script vpradeep Linux - Newbie 2 09-01-2008 04:29 AM
Run script after server re-start ust Linux - Software 4 05-16-2008 08:50 AM
Using PHP to run a script on another server qscomputing Programming 4 04-12-2006 11:49 AM


All times are GMT -5. The time now is 03:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration