vscodeのSFTPプラグイン、利用されてるかたも多いと思います。
わたしも先日使い始めましたが、秘密鍵のパスフレーズをそのまま記載するのはなんか気持ち悪い感じがして、毎回入力する方法を調べてみました。
Webで色々探してもなかなか出てこなかったんですが、公式のリポジトリ行ったら普通に書いてました。なんなんよ……笑
passphrase
mixed: For an encrypted private key, this is the passphrase string used to decrypt it. Set to true for enabling passphrase dialog. This will prevent from using cleartext passphrase in this config.
というわけで、passphrase
の項目をtrue
にすることで、毎回ダイアログが開いてログインすることができました。
サンプル
{
"name": "APP",
"host": "999.999.999.999",
"protocol": "sftp",
"port": 22,
"username": "apache",
"passphrase": true,
"privateKeyPath": "~/.ssh/xxxxxxxx",
"remotePath": "/var/www/xxx/yyy/zzz",
"uploadOnSave": false,
"ignore": [
".vscode",
".git"
]
}
fork元のSFTPプラグインのissueに、interactiveAuth
もtrue
にするとか書いてましたが、これはどっちでもよさそうでした。あえてfalse
設定してもパスフレーズのダイアログは開きました。