vscode-deploy-reloaded icon indicating copy to clipboard operation
vscode-deploy-reloaded copied to clipboard

Connecting without privateKey is failing

Open jlubeck opened this issue 5 years ago • 1 comments

Description

So I'm trying to connect to my server, in which on the terminal I just do

ssh [email protected]

And I can't seem to make it work. I have my computer's ssh keys on the authorized_keys of the server. That is why it's not asking for a key or password.

Actual behavior

If I don't include a privateKey option, it fails with this error: 🔥 [ERROR] Could not deploy files to 'server': 'All configured authentication methods failed'

If I include the path to my .ssh/id_rsa.pub it fails with this error: 🔥 [ERROR] Could not deploy files to 'server': 'privateKey value does not contain a (valid) private key'

Expected behavior

It should connect without issues

Example config

{
    "deploy.reloaded": {
        "packages": [
            {
                "name": "Version 2.3.4",
                "description": "Package version 2.3.4",
                "files": [
                    "build/**"
                ],
                "button": {
                    "text": "Deploy to 'server.com'",
                    "tooltip": "Click here to deploy to server...",
					"targets": [ "server" ],
					"showPrompt" : true
                }
			}
        ],
        "targets": [
            {
                "type": "sftp",
                "name": "server",
                "dir": "/var/www/server/public_html/",
				"host": "server.com", 
				"port": 22,
                "user": "root",
                "privateKey":"/Users/server/.ssh/id_rsa.pub",
                "mappings": {
                    "/build/**/*" : "/"
                }
			}
        ]
    }
}

Your environment

  • Operating system: macOS
  • Visual Studio Code version: 1.32.3
  • Extension version: don't know where to check it

jlubeck avatar Apr 04 '19 02:04 jlubeck

Hey, did you solve this issue?

frankykubo avatar Sep 09 '20 21:09 frankykubo