免费注册 查看新帖 |

Chinaunix

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

linux shell 远程协助 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-17 16:39 |只看该作者 |倒序浏览

               

  Normal
  0
  
  7.8 磅
  0
  2
  
  false
  false
  false
  
   
   
   
   
   
   
   
   
   
   
   
   
  
  MicrosoftInternetExplorer4



st1\:*{behavior:url(#ieooui) }
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:普通表格;
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";
        mso-ansi-language:#0400;
        mso-fareast-language:#0400;
        mso-bidi-language:#0400;}
linux shell 远程协助

在windows xp下你可以使用远程协助,大体过程就是你向远端的专家发出协助请求,远端同意后,专家和你可以同时操作你的桌面。

linux黑乎乎的控制台下也可以实现远程协助功能:

第一步:确保系统中安装有tcl和expect这2个软件包。
将使用expect包中的脚本kibitz。

第二步:发出请求,同意请求,协助建立
先查看一下谁在线:
linux-dl180G6:/home/sxg/mnt # w
18:39:43 up
2:25,  3 users,  load average: 0.00, 0.00, 0.00
USER   
TTY        LOGIN@   IDLE  
JCPU   PCPU WHAT
root   
pts/0     16:27    0.00s
0.17s  0.00s w
root   
pts/1     18:31    5:22  
0.04s  0.04s -bash
假设其中pts/0是自己,pts/1是远端的某位专家。

发出请求,如下:
linux-dl180G6:/home/sxg/mnt # kibitz -tty pts/1 root
asking root to type:  kibitz -5277
| (闪烁的光标)

此时专家控制台会出现如下:
linux-dl180G6:~ #
Message from root@linux-dl180G6 on pts/0 at 18:42 ...
Can we talk? Run: kibitz -5277
EOF
| (闪烁的光标)

此时,专家如果敲入提示的Run行:kibitz -5277,则会如下:
linux-dl180G6:~ #
Message from root@linux-dl180G6 on pts/0 at 18:42 ...
Can we talk? Run: kibitz -5277
EOF
kibitz -5277
Escape sequence is ^]
linux-dl180G6:/home/sxg/mnt #
可以看到,此时专家的当前目录变成了请求者的当前目录。

此时,请求者的屏幕显示如下:
linux-dl180G6:/home/sxg/mnt # kibitz -tty pts/1 root
asking root to type:  kibitz -5277
Escape sequence is ^]
linux-dl180G6:/home/sxg/mnt #


第三步:开始协助
此时,请求者和专家在各自命令行上敲的任何字符,都会同步显示到对方的控制台上,不管是否敲了回车。


第四步:协助结束
任何一方敲入exit则协助结束。

               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/8754/showart_1999385.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP