Skip to content
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 · 9 comments
Closed

Using SSH agent on mac OS #18

343max opened this issue Aug 6, 2017 · 9 comments

Comments

@343max
Copy link

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
Copy link
Owner

liximomo commented Aug 7, 2017

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

@pevnak
Copy link

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.

@nivintw
Copy link

nivintw 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
Copy link
Owner

@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
Copy link

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
Copy link

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
Copy link

skyrpex commented Jul 23, 2018

Something like "agent": true would be nice.

@liximomo
Copy link
Owner

liximomo commented Jul 26, 2018

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

"agent": "$SSH_AUTH_SOCK"

@Charly-HID
Copy link

Charly-HID commented Jun 6, 2023

Generate your ssh key specifying the ecdsa algorithm type: ssh-keygen -t ecdsa (Linux) PuTTY (Windows)

{
"name": "your_remote_server_name",
"host": "123.456.789.100",
"protocol": "sftp",
"port": 1234,
"username": "remote_user_name",
"privateKeyPath": "/home/local_user_name/.ssh/id_ecdsa",
"passphrase":true,
"remotePath": "/home/remote_user_name/folderxyz",
"uploadOnSave": true,
"useTempFile": false,
"openSsh": false
}

If you don't use a passphrase when generating your ssh key, remove ("passphrase":true,) from this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants