NetBSD上のPuTTYでUnix domain socket経由でsshアクセスしてみる

PuTTY 0.75の変更点によると、 PuTTYのツールでUnix domain socketが接続先等に指定できるようになっている。

The Unix tools can now connect directly to a Unix-domain socket.

OpenSSHのsshコマンドはUnix domain socketに接続はできないようだし、sshdもUnix domain socketで接続を待ち受けることは できないようだが、sshコマンドでport forwardingでUnix domain socketを転送の元としても先としても利用できるようだ。

以下のようにすることで、remotehostホストで起動するsshdが22番portで待ち受ける接続を、 /tmp/test.sockからアクセス可能にする。 -o StreamLocalBindUnlink=yesは、/tmp/test.sockが既に接続済みである場合に上書きして作成するように指示している。

$ ssh -o StreamLocalBindUnlink=yes -NL /tmp/test.sock:remotehost:22 localhost

以下が接続した場合の例である。

$ plink -ssh /tmp/test.sock
WARNING - POTENTIAL SECURITY BREACH!
The server's host key does not match the one PuTTY has
cached. This means that either the server administrator
has changed the host key, or you have actually connected
to another computer pretending to be the server.
The new ssh-ed25519 key fingerprint is:
ssh-ed25519 255 SHA256:xxxx
If you were expecting this change and trust the new key,
enter "y" to update PuTTY's cache and continue connecting.
If you want to carry on connecting but without updating
the cache, enter "n".
If you want to abandon the connection completely, press
Return to cancel. Pressing Return is the ONLY guaranteed
safe choice.
Update cached key? (y/n, Return cancels connection, i for more info) y
Using username "username".
Access granted. Press Return to begin session.
Last login: Sat Jul 24 01:10:29 2021 from xxxx
NetBSD 9.1_STABLE (XEN3_DOMU) #2: Wed Jan  6 15:28:26 JST 2021

$

0 件のコメント:

コメントを投稿

注: コメントを投稿できるのは、このブログのメンバーだけです。

NetBSD上のFirefox 124.0.1で、ClearKey EMEの動作確認をする

pkgsrc/www/firefoxをbuildした後に確認している事項として、ClearKey EMEを利用できるか試している。 以下の2つで、映像と音声が再生できれば問題ないはずと思っている。 dash.jsのClearkey DRM instantiati...