Created
June 12, 2013 05:57
-
-
Save tkoki/5763109 to your computer and use it in GitHub Desktop.
Mac OS X 10.5.x 〜 Mac OS X 10.6.xでsshトンネル経由でLAN内のSMBサーバーに接続する方法。10.8.xではloopbackアドレスへの接続が許可されてるので、この例の様に仮想インタフェースを作る必要は無い。10.7.xは未確認。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 仮想インタフェースの作成 | |
% sudo ifconfig lo0 alias 127.0.0.2 | |
Password: <--- パスワードを入力。 | |
2. トンネル接続 | |
% ssh -N <username>@<ssh server> -L 127.0.0.2:8139:<SMB server>:139 | |
3. Finderでマウント | |
⌘-Kで, | |
smb://127.0.0.2:8139/<folder name> | |
などとする。接続が不要になったらアンマウント後トンネルを破棄し、仮想インタフェースも消すとよい。仮想インタフェースは | |
% sudo ifconfig lo0 -alias 127.0.0.2 | |
で消せる。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment