私はVisual Studioのコードワークフローでvscode-sftp extensionを使用して、リモートサーバーにファイルをアップロードします。私はSublime TextのSFTP pluginと同じようにパスワードレス認証を実現しようとしています。しかし、キャッチがvscode-SFTPのために、sftp.json
ファイルで、私はこれが動作するために、プレーンテキストとしての私のパスワードを入力する必要がある:私は私のサーバーにSSH場合、Visual Studioコード - SSH認証を使用するSFTP拡張
{
"host": "mysamplehost.com",
"port": 22,
"username": "username",
"password": "password",
"protocol": "sftp",
"agent": null,
"privateKeyPath": null,
"passphrase": null,
"passive": false,
"interactiveAuth": false,
"remotePath": "/",
"uploadOnSave": true,
...
}
をしかし、私は得ることはありませんMacBookにSSHキーがあるので、パスワードを尋ねました。この認証方法を使用するためにvscode-sftpを設定するにはどうすればよいですか?
私はしかし、私はこれを設定する方法がわからない、documentationで次のコメントを参照してください。
/**
* string - Path to ssh-agent's UNIX socket for ssh-agent-based user authentication.
* Windows users: set to 'pageant' for authenticating with Pageant or (actual) path to a cygwin "UNIX socket.
*/
agent: null,
privateKeyPath: null, // absolute path to user private key
passphrase: null,
passive: false, // ftp passive mode
再起動するたびにエージェントのパスが変更されますが、私が見つけた回答はこちらです[https://apple.stackexchange.com/a/177419](https://apple.stackexchange.com/a/177419) –