code-debug icon indicating copy to clipboard operation
code-debug copied to clipboard

Allow to connect via ssh without agent/key-file (with Kerberos, specifying ssh options)

Open GitMensch opened this issue 4 years ago • 5 comments

  • gdb --version 10.1
  • debugging works

The current setup that works is:

					"ssh": {
						"host": "${config:project.server}",
						"user": "${env:USERNAME}",
						"password": "${config:my.pass}",
						"keyfile": "${config:my.key}",

But this adds the need of adding two "unknown" settings to each user's settings.json for password + key - and generate a keyfile for every user (and, if there's a short connection issue, then debugging stops during startup).

In every other place of this projects we use "plain" ssh tasks for example:

			{
				"label": "show what I do",
				"command": "X:\\OpenSSH64\\ssh.exe",
				"args": [
					"-t",
					"-K",
					"-o", "CheckHostIP=no",
					"-o", "StrictHostKeyChecking=no",
					"-o", "ConnectionAttempts=5",
					"${env:USERNAME}@${config:project.server}",
					"ps -fu `whoami`"
				]
				"group": "none"
			},

So the other places use an ssh binary and passing different options, including Kerberos authentication instead of private key It would be very good to use the exact same or similar setup for debugging via ssh, too.

GitMensch avatar Apr 28 '21 16:04 GitMensch

Any hint how to possibly implement that? [I guess that would take quite some time for me, but I may would give it a try if there's general support for this approach but it is unlikely to be added otherwise]

GitMensch avatar Jun 14 '21 13:06 GitMensch

right now the ssh2 dependency is used for SSH connection, would need to check there for support of this.

WebFreak001 avatar Jun 17 '21 07:06 WebFreak001

Any news about this, or any workarounds?

My only options to authenticate are password and Kerberos, and I don't feel very safe in putting the unencrypted password in the config file.

renyhp avatar Oct 28 '22 10:10 renyhp

You can use an input configuration, this way you will be asked each time, but if you don't debug only for seconds, then this is a reasonable workaround.

GitMensch avatar Oct 28 '22 12:10 GitMensch

is it possible to spawn a local ssh server using sshd or ssh that just forwards or tunnels the connection? That way we could use the system-installed SSH and just rely on the node dependency to connect to the local tunnel.

WebFreak001 avatar Jan 03 '23 19:01 WebFreak001