免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3378 | 回复: 7
打印 上一主题 下一主题

在shell文件裡面,怎麼樣調用另外一台unix上的shell文件? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-10-26 18:08 |只看该作者 |倒序浏览
如題!

论坛徽章:
0
2 [报告]
发表于 2004-10-27 00:48 |只看该作者

在shell文件裡面,怎麼樣調用另外一台unix上的shell文件?

ssh [user@]host command
e.g.
ssh usertest@hosttest ls -l

论坛徽章:
0
3 [报告]
发表于 2004-10-27 09:17 |只看该作者

在shell文件裡面,怎麼樣調用另外一台unix上的shell文件?

謝謝,我想運\行remote server上的shell文件。
在remsh remote_host -l login_user -n /path/to/script.sh中,我在哪裡設置或填寫密碼啊?

论坛徽章:
0
4 [报告]
发表于 2004-10-27 10:00 |只看该作者

在shell文件裡面,怎麼樣調用另外一台unix上的shell文件?

Hi,

Assume your remote host is host2, your local server is host1, you have account johndoe on host1 and host2.

On host2, under johndoe\'s home directory, e.g. /home/johndoe, create a .rhosts file, inside the file, put one line:
host1  johndoe

Now, on host1, you can run the script on host2:
$ remsh host2 -n /some/path/to/script.sh

The above command can be put into a script on host1 too.

Hope this helps.

论坛徽章:
0
5 [报告]
发表于 2004-10-27 11:11 |只看该作者

在shell文件裡面,怎麼樣調用另外一台unix上的shell文件?

請問是建立.rhost  還是.rhosts  文件?
我把這兩個文件都建了在host2上,該user(test)的home的目錄下了.(/home/test)
但是在host1下運\行一下語句是報錯:
$remsh host -n ls
remshd: Login incorrect.

請問我哪裡弄錯了?

论坛徽章:
0
6 [报告]
发表于 2004-10-27 11:25 |只看该作者

在shell文件裡面,怎麼樣調用另外一台unix上的shell文件?

remote host: /.rhost or /etc/hosts.equiv
add your local hostname

论坛徽章:
0
7 [报告]
发表于 2004-10-29 08:29 |只看该作者

在shell文件裡面,怎麼樣調用另外一台unix上的shell文件?

[quote]原帖由 \"unix-plus\" 发表:
請問是建立.rhost  還是.rhosts  文件?
我把這兩個文件都建了在host2上,該user(test)的home的目錄下了.(/home/test)
但是在host1下運\行一下語句是報錯:
$remsh host -n ls
remshd: Login incorrect.

請問我

论坛徽章:
0
8 [报告]
发表于 2004-10-29 16:54 |只看该作者

在shell文件裡面,怎麼樣調用另外一台unix上的shell文件?

Yes,I can!
那還有什麼原因會報錯呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP