在遠端機器執行指令 - Linux

By Dinah
at 2011-10-13T02:25
at 2011-10-13T02:25
Table of Contents
最近工作上需要查看某台機器(say A)上的連線,是從哪台機器(say B)連過來的
然後去看remote machine上哪一個process連過來的
現在遇到的問題是我的script是在A跑的,所以我勢必要跑個remote command on B,
但是我找到的方法都是用ssh <username>@<hostname> <command>這樣,這個方法
我以前也用過,但是必須要先設定key pairs然後還要copy到B,這不符合我的需求。
我有B的登入帳號及密碼,不知道有沒有什麼方法可以讓我一行就執行遠端指令呢?
例如
ssh <username>@<hostname> -p <password> <command>
我知道ssh沒有這個option啦,只是想表達出我的需求^^
先謝謝各位幫忙~~
--
然後去看remote machine上哪一個process連過來的
現在遇到的問題是我的script是在A跑的,所以我勢必要跑個remote command on B,
但是我找到的方法都是用ssh <username>@<hostname> <command>這樣,這個方法
我以前也用過,但是必須要先設定key pairs然後還要copy到B,這不符合我的需求。
我有B的登入帳號及密碼,不知道有沒有什麼方法可以讓我一行就執行遠端指令呢?
例如
ssh <username>@<hostname> -p <password> <command>
我知道ssh沒有這個option啦,只是想表達出我的需求^^
先謝謝各位幫忙~~
--
Tags:
Linux
All Comments

By Carol
at 2011-10-15T06:43
at 2011-10-15T06:43

By Xanthe
at 2011-10-19T23:07
at 2011-10-19T23:07

By Todd Johnson
at 2011-10-20T02:45
at 2011-10-20T02:45
Related Posts
Debian跟BSD上類似killall5的指令?

By Agatha
at 2011-10-12T05:20
at 2011-10-12T05:20
詭異的問題+雜問

By Michael
at 2011-10-11T23:34
at 2011-10-11T23:34
Debian和OpenSUSE的抉擇問題

By Genevieve
at 2011-10-11T21:39
at 2011-10-11T21:39
glib版本問題

By Kelly
at 2011-10-11T20:57
at 2011-10-11T20:57
不是 root 要如何 mount ISO 檔?

By Ida
at 2011-10-11T19:59
at 2011-10-11T19:59