08-RSH命令
本章節下載: 08-RSH命令 (88.39 KB)
【命令】
rsh host [ user username ] command remote-command
用戶視圖
【缺省級別】
0:訪問級
【參數】
host:遠程主機的IP地址或主機名,為1~20個字符的字符串。
user username:指定登錄到遠程主機的用戶名,為1~20個字符的字符串。如果不指定該參數,則使用設備的係統名。
command remote-command:設置遠程執行的命令。支持的遠程命令依據RSH服務器所運行的操作係統而不同。
【描述】
rsh命令用來執行遠程主機的命令。
需要注意的是,遠程主機上需要運行RSH Daemon。通過rsh命令,用戶可以在RSH客戶端實現對遠程主機命令的調用執行。
【舉例】
# 使用rsh命令查看遠程主機上的目錄/文件信息,遠程主機的IP地址為169.254.1.100,操作係統為Windows 2000。
<Sysname> rsh 169.254.1.100 command dir
Trying 169.254.1.100 ...
Press CTRL+K to abort
驅動器 C 中的卷是 SYSTEM
卷的序列號是 2A0F-18DF
C:\WRSHDNT 的目錄
2004-07-13 09:10 <DIR> .
2004-07-13 09:10 <DIR> ..
2001-05-10 09:04 162,304 UNWISE.EXE
2001-12-05 15:36 45,056 wrshdcfg.exe
1996-08-05 15:39 48,128 ctrlrshd.exe
1998-10-13 16:31 31,744 forewin.exe
2004-01-02 23:05 40,625 history.txt
2003-02-26 17:04 6,822 order.txt
1997-08-26 16:05 23,552 whoami.exe
2001-12-07 17:28 122,880 wrshdctl.exe
2003-06-21 10:51 192,512 wrshdnt.cpl
2001-12-09 16:41 38,991 wrshdnt.hlp
2001-12-09 16:26 1,740 wrshdnt.cnt
2003-06-22 11:14 452,230 wrshdnt.htm
2003-06-23 18:18 4,803 wrshdnt_header.htm
2003-06-23 18:18 178 wrshdnt_filelist.xml
2003-06-22 11:13 156,472 wrshdnt.pdf
2001-09-02 15:41 49,152 wrshdrdr.exe
2003-06-21 10:32 69,632 wrshdrun.exe
2004-01-02 15:54 196,608 wrshdsp.exe
2004-01-02 15:54 102,400 wrshdnt.exe
2001-07-30 18:05 766 wrshdnt.ico
2004-07-13 09:10 3,253 INSTALL.LOG
21 個文件 1,749,848 字節
2 個目錄 2,817,417,216 可用字節
# 使用rsh命令設置遠程主機的時間,遠程主機的IP地址為169.254.1.100,操作係統為Windows 2000。
<Sysname> rsh 169.254.1.100 command time
Trying 169.254.1.100 ...
Press CTRL+K to abort
當前時間: 6:56:42.57
輸入新時間: 12:00
12:00
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!