sshcode icon indicating copy to clipboard operation
sshcode copied to clipboard

sshcode to a MacOS

Open holeybit opened this issue 6 years ago • 17 comments

Is sshcode supposed to work connecting to a Mac?

wget -N https://codesrv-ci.cdr.sh/latest-linux
  1. looks like it tries to download linux version.
  2. wget is not available by default. (curl is)

cheers,

holeybit avatar Apr 27 '19 03:04 holeybit

We haven’t tried to support it yet.

ammario avatar Apr 27 '19 03:04 ammario

The supported use-case is a remote linux machine, personally I tend to test on ubuntu 16.04. However, removing external dependencies (other than ssh) is something we've been considering.

sreya avatar Apr 30 '19 23:04 sreya

Are you guys open for PR? I've made the following changes to support both linux and Mac code-server:

func downloadScript(codeServerPath string) string {
	return fmt.Sprintf(
		`set -euxo pipefail || exit 1
mkdir -p ~/.local/share/code-server %v
cd %v
if [[ "$OSTYPE" == "linux-gnu" ]]; then
  curl -z latest-code-server -o latest-code-server https://codesrv-ci.cdr.sh/latest-linux
elif [[ "$OSTYPE" == "darwin"* ]]; then
  curl -z latest-code-server -o latest-code-server https://codesrv-ci.cdr.sh/latest-darwin
fi
[ -f %v ] && rm %v
ln latest-code-server %v
chmod +x %v`,
		filepath.Dir(codeServerPath),
		filepath.Dir(codeServerPath),
		codeServerPath,
		codeServerPath,
		codeServerPath,
		codeServerPath,
	)
}

https://github.com/holeybit/sshcode/tree/feat/support-mac-code-server

Obviously, https://codesrv-ci.cdr.sh/latest-darwin does not exist currently. But when I use my own server, I was able to test on ubuntu 16.04, 18.04 and MacOS Mojave.

holeybit avatar May 01 '19 01:05 holeybit

I think for now we're just going to support remote Linux environments. If it becomes obvious that a lot of people want/need remote Mac environments then we would potentially be open to supporting it...for now the goal is to keep sshcode as simple as possible

sreya avatar May 01 '19 19:05 sreya

Sounds good. I'm currently using this via ngrok from my laptop (on the go) to my desktop Mac at home. Would be nice to have an official support in the future. Thanks!

holeybit avatar May 01 '19 19:05 holeybit

Ah that makes sense, thanks for your interest in the project! Please don't hesitate to file additional issues as you come across them

sreya avatar May 01 '19 19:05 sreya

@holeybit where did you get the binary for code-server?

martimarkov avatar Oct 31 '19 17:10 martimarkov

I'd also love to see macos as remote machine

fabianmu avatar May 05 '20 19:05 fabianmu

Yes will reopen, I'm sure people have Mac minis lying around they wanna use.

nhooyr avatar May 05 '20 19:05 nhooyr

Ace, thanks! That's exactly my case - my main machine is a mac mini in the office that I would like to connect to.

fabianmu avatar May 06 '20 07:05 fabianmu

Me, too. In my case, I really want to replace my 15” MacBook Pro with iPad Pro + iMac.

judewang avatar May 20 '20 13:05 judewang

Coming soon ;)

nhooyr avatar May 20 '20 13:05 nhooyr

@judewang You wouldn't be able to use sshcode on an iPad though.

nhooyr avatar May 20 '20 13:05 nhooyr

@nhooyr I forgot... Only thought about I have ssh client on my iPad.

judewang avatar May 20 '20 13:05 judewang

Any updates on this @nhooyr ?

fabianmu avatar Jun 18 '20 06:06 fabianmu

See https://github.com/cdr/sshcode/issues/185

Best to use the code-server install script for now and forward the port yourself. See https://github.com/cdr/code-server#quick-install

We plan on adding SSH support to it to replace sshcode. See https://github.com/cdr/code-server/issues/1729

nhooyr avatar Jun 18 '20 07:06 nhooyr

Oh that works, splendid, thanks @nhooyr!

fabianmu avatar Jun 18 '20 07:06 fabianmu