LoginSignup
5
4

More than 5 years have passed since last update.

Sakura VPSにmoshで接続するための設定

Posted at

参考:Mosh(mobile shell)

VPS環境

CentOSのバージョン確認

$ cat /etc/redhat-release

CentOS release 6.3 (Final)

パッケージの検索。

$ yum search mosh

mosh.x86_64 : Mobile shell that supports roaming and intelligent local echo

あったのでインストール

$ sudo yum install mosh

iptablesの設定変更

# vi /etc/sysconfig/iptables

60000〜61000のポートを使うので、それを開ける。

iptablesの設定内にあるINPUTのポート設定に下記を追記する

 -A INPUT -p udp -m udp --dport 60000:61000 -j ACCEPT

iptablesを再設定

# service iptables restart

一旦ログアウト

$ exit

手元のmac環境

MacOSX 10.8.2

Homebrewから

brew install mobile-shell

※~/.ssh/configにhostの設定がされている必要があるので適当に設定

Host vps
        Hostname wwwXXXXue.sakura.ne.jp
        port 10022
        IdentityFile ~/.ssh/vps_rsa
        User username
$ mosh vps

上記のコマンドでログインできるはず。

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4