2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VS CodeでFreeBSDにリモート接続

Posted at

WordPressを設置することになり、SFTPのアカウントを作ってもらったのでVS Codeでリモート接続しようとしたら繋がらない。Terminalでsshすると接続できるのだけど、VS Codeのリモート接続だとエラーが出てしまう。

[12:10:43.585] WARN: $PLATFORM is undefined in installation script output.  Errors may be dropped.
[12:10:43.586] Failed to parse remote port from server output
[12:10:43.586] Terminating local server
[12:10:43.587] > 40099
[12:10:43.590] Resolver error: Error: 
	at y.Create (/Users/[username]/.vscode/extensions/ms-vscode-remote.remote-ssh-0.117.1/out/extension.js:2:739050)
	at t.handleInstallOutput (/Users/[username]/.vscode/extensions/ms-vscode-remote.remote-ssh-0.117.1/out/extension.js:2:737131)
	at e (/Users/[username]/.vscode/extensions/ms-vscode-remote.remote-ssh-0.117.1/out/extension.js:2:789804)
    ....
[12:10:43.597] ------

[12:10:43.597] No hints found in the recent session.
[12:10:43.600] Local server exit: 15

$PLATFORMが怪しいのではないか、ログイン後のシェルの設定がおかしいのではないか、などとGPTは言うのでssh越しに.profileや.shrcを編集してみたがどうにもうまく動かない。

結論から言うとVS CodeのRemote SSHは単なるクライアントではなくて、VS Codeサーバーをインストールするものなので、VS CodeがサポートしていないFreeBSDでは動作しないということなのだ。

標準がダメならサードパーティー、というわけで探してみるといいものを見つけた。

  • SSH FS Visual Studio Market Place

Fuseを使うfuse-sshfsではなく、sshの出力をVS Codeで利用するプラグイン。VS Codeが対応していなかったり、ポートフォワーディングが動かなかったりするサーバーに繋ぐときは有効だと思う。少なくともFreeBSDに繋ぐのには役に立った。これは後から見つけたんだけど、チュートリアルを日本語で書いてくださる方もいた。

2
0
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?