code-debug
code-debug copied to clipboard
Allow to connect via ssh without agent/key-file (with Kerberos, specifying ssh options)
gdb --version10.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.
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]
right now the ssh2 dependency is used for SSH connection, would need to check there for support of this.
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.
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.
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.