shnulaa

Never deter till tomorrow that which you can do today
posts - 15, comments - 0, trackbacks - 0, articles - 2
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

ssh

Posted on 2010-09-28 17:10 shnulaa 阅读(204) 评论(0)  编辑  收藏 所属分类: linux

server

ssh ---10000:localhost:22 lyb@3322.org


client
ssh lyb@localhost -10000


 1#!/bin/bash
 2while true;do
 3RET=`ps ax | grep "ssh -f -N -R 10000:localhost:22" | grep -"grep"`
 4if [ "$RET" = "" ]; then
 5echo "restart ssh server"
 6ssh ---10000:localhost:22 lyb@hahalee.3322.org
 7fi
 8sleep 10
 9done
10

只有注册用户登录后才能发表评论。


网站导航: