New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using SSH agent on mac OS #18

Closed
343max opened this Issue Aug 6, 2017 · 8 comments

Comments

Projects
None yet
7 participants
@343max

343max commented Aug 6, 2017

Hey!

I can't figure out how to use the built-in ssh agent on mac OS. For obvious reasons I don't want to enter my ssh password into a clear text file, nor do I want to enter the passphrase for my ssh key into a clear text file. Do you know how I can convince your tool to use the standard mac OS ssh agent so the password stored in the keychain will be used?

@liximomo

This comment has been minimized.

Owner

liximomo commented Aug 7, 2017

image
The REAMDE is clear. You can get the socket by runing echo $SSH_AUTH_SOCK.

@pevnak

This comment has been minimized.

pevnak commented Aug 15, 2017

Hi,

first of all, thanks for the plugin. I would like to ask, if it is possible to load configuration from ssh-config and load the private key from there. I am using Mac OS, but when I have put the name of the server as in ssh-config, it was not located. Also, the passwordless login does not work either.

Thanks for help.

@twn346

This comment has been minimized.

twn346 commented Jan 22, 2018

Just as a reminder, I am also having this issue on Mac OS. I have the same problem as the original poster.
The below config works if I set my key file passphrase, but for the same reasons as the original poster I would rather not do that.
My config (with some things clearly changed):

{
    "host": "fake.server.com",
    "port": 22,
    "username": "myuser",
    "password": null,
    "protocol": "sftp",
    "agent": "/private/tmp/com.apple.launchd.OsTzEjBVX8/Listeners", #output of echo $SSH_AUTH_SOCK
    "privateKeyPath": "/valid/path/to/file",
    "passphrase": null,
    "passive": false,
    "interactiveAuth": false,
    "remotePath": "/valid/remote/path",
    "uploadOnSave": true,
    "syncMode": "update",
    "watcher": {
        "files": false,
        "autoUpload": false,
        "autoDelete": false
    },
    "ignore": [
        "**/.vscode/**",
        "**/.git/**",
        "**/.DS_Store"
    ]
}
@liximomo

This comment has been minimized.

Owner

liximomo commented Jan 28, 2018

@twn346 In next release it's will prompt you to enter a passphrase. This will prevent from using cleartext passphrase in this config. Just wait a couple of days.

@dboune

This comment has been minimized.

dboune commented Apr 17, 2018

@liximomo It would be really nice if the agent socket path could be detected, or some method of saying "just use $SSH_AUTH_SOCK please". It is a, albeit minor, annoyance to have to modify that config for each project each time the socket is regenerated, typically on reboot.

@benwick

This comment has been minimized.

benwick commented Jul 20, 2018

It is a, albeit minor, annoyance to have to modify that config for each project each time the socket is regenerated, typically on reboot.

Minor annoyance? I think, this is a big problem. Please add a option to auto extract $SSH_AUTH_SOCK from the environment.

@skyrpex

This comment has been minimized.

skyrpex commented Jul 23, 2018

Something like "agent": true would be nice.

@liximomo

This comment has been minimized.

Owner

liximomo commented Jul 26, 2018

@benwick @dboune @skyrpex In v1.2.6, you can set Environment Variable as value.

"agent": "$SSH_AUTH_SOCK"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment