Total Pageviews

Monday, 18 November 2019

把Openshift空间用作ssh server

  1. 首先注册帐号,
  2. 然后安装OpenShift Client tools 简称rhc , lz是centos 7.2, 官方步骤
    1
    sudo gem install rhc
  3. 然后开始配置,按提示一步一步完成
    1
    2
    3
    4
    5
    6
    7
    $ rhc setup
    OpenShift Client Tools (RHC) Setup Wizard
     
    This wizard will help you upload your SSH keys, set your application namespace, and check that other programs like Git are properly installed.
     
    If you have your own OpenShift server, you can specify it now. Just hit enter to use the server for OpenShift Online: openshift.redhat.com.
    Enter the server hostname: |openshift.redhat.com|
    之后就可以拿ssh登陆了,但是有段时间不用的话就会
    1
    This gear has been temporarily unidled. To keep it active, access your app @ http://python-xxx.rhcloud.com/
    如果能连上,说明配置正确,只要在本机这样就行了:
    1
     ssh -D 7080 your-username@python-xxx.rhcloud.com
    然后你在firefox里,设置socks5代理为127.0.0.1,端口7080,ff就可以翻墙了。

    ps: openshift/heroku上可以装 shadowsocks-heroku

    参考:
    Openshift – Remote Connection (SSH)