Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.

sshCmdStr should be updated #155

Closed
Merith-TK opened this issue Nov 27, 2019 · 2 comments
Closed

sshCmdStr should be updated #155

Merith-TK opened this issue Nov 27, 2019 · 2 comments

Comments

@Merith-TK
Copy link
Contributor

Merith-TK commented Nov 27, 2019

as stated,
this line
https://github.com/cdr/sshcode/blob/master/sshcode.go#L147

	sshCmdStr :=
		fmt.Sprintf("ssh -tt -q -L %v:localhost:%v %v %v 'cd %v; %v --host 127.0.0.1 --auth none --port=%v'",
			o.bindAddr, o.remotePort, o.sshFlags, host, dir, codeServerPath, o.remotePort,
		)

should be

	sshCmdStr :=
		fmt.Sprintf("ssh -tt -q -L %v:localhost:%v %v %v '%v --host 127.0.0.1 --auth none --port=%v %v'",
			o.bindAddr, o.remotePort, o.sshFlags, host, codeServerPath, o.remotePort, dir,
		)

as code-server is no longer opening (atleast for me) in the users PWD when they call it

This edit tells code-server to open that path DIRECTLY from code-server
same concept as upstream vscode

I have already implemented this in my fork (not yet pushed as i am still fixing it up)

@deansheather deansheather changed the title [BUG][BROKEN] sshCmdStr should be updated sshCmdStr should be updated Feb 21, 2020
@deansheather
Copy link
Member

This patch doesn't work as you'd expect as code-server always opens the last opened dir before it tries to open whatever was passed on the command line. coder/code-server#1132

@Merith-TK
Copy link
Contributor Author

Okay this resolves it for code-server, but i was linked back here on sshcode, that resolves code-server, not sshcode.

Working on an idea to get 3.0.2 working on sshcode

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

No branches or pull requests

2 participants