4
5

More than 3 years have passed since last update.

SSH FSでroot権限で編集できるようにする。

Last updated at Posted at 2020-05-10

Visual Studio Codeでssh -fsという拡張機能がある。
コレ自体は非常に使いやすいのだが、sudoコマンドやroot権限でないとアクセスできないファイルの編集はできなかった。

そこで出来るようにならないかと調べた所、こちらにやり方があった。
https://github.com/SchoofsKelvin/vscode-sshfs/issues/28

以下やりかた。


前提としてすでにSSH FSにSSH接続するサーバーを登録していることが必要。

拡張機能の設定を押すと出てくるドロップダウンメニューから【拡張機能の設定】を選ぶ。

Inkedf61d06b3ec1a8c8389d1b480886e6446_LI.jpg

次にConfigsのSetting.jsonを開く。

75e8650340b61b2c4663c24c728b1014.png

最後にサーバーの設定に"sftpCommand": "sudo /usr/lib/openssh/sftp-server"を追加する。

bokashita.png

以上。

4
5
1

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
4
5