V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
Livid
271.61D
575.01D
V2EX  ›  Linux

关于在 Ubuntu 下开机之后就自动打开一个 ssh tunnel

  •  
  •   Livid ·
    PRO
    · Mar 9, 2012 · 5623 views
    This topic created in 5174 days ago, the information mentioned may be changed or developed.
    Ubuntu 11.10,如果想在开机之后就自动打开一个 ssh tunnel,有哪些比较方便的手段呢?

    实在是很怀念 Mac OS X 上的 launchd。
    7 replies    1970-01-01 08:00:00 +08:00
    virushuo
        1
    virushuo  
       Mar 9, 2012
    如果用key登录的话我估计扔在rc里面就行吧?
    Vim
        2
    Vim  
       Mar 9, 2012
    不用key也没关系,写个expect脚本就行了
    Livid
        3
    Livid  
    MOD
    OP
    PRO
       Mar 9, 2012
    @virushuo 嗯,补充一下,如果还希望能够断掉之后就自动重新链接呢?
    virushuo
        4
    virushuo  
       Mar 9, 2012
    @Livid http://www.harding.motd.ca/autossh/ 那么用这东西试试看?
    Vim
        5
    Vim  
       Mar 9, 2012
    在家目录的.ssh/config文件里加ServerAliveInterval就行了
    acgism
        6
    acgism  
       Mar 9, 2012
    ctrl+alt+f2 ctrl+alt+f7 不行麽。。。。
    soulteary
        7
    soulteary  
       Mar 9, 2012
    有个简单的方法,搜索conky开机启动,把脚本中的 conky修改掉,记得启动脚本有一种是界面启动前执行,有一种是界面启动完成后执行…楼主注意
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1006 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 19:17 · PVG 03:17 · LAX 12:17 · JFK 15:17
    ♥ Do have faith in what you're doing.