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

sshcode to a MacOS #70

Open
holeybit opened this issue Apr 27, 2019 · 17 comments
Open

sshcode to a MacOS #70

holeybit opened this issue Apr 27, 2019 · 17 comments

Comments

@holeybit
Copy link

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,

@ammario
Copy link
Member

ammario commented Apr 27, 2019

We haven’t tried to support it yet.

@sreya
Copy link
Collaborator

sreya commented Apr 30, 2019

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 sreya closed this as completed Apr 30, 2019
@holeybit
Copy link
Author

holeybit commented May 1, 2019

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.

@sreya
Copy link
Collaborator

sreya commented May 1, 2019

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

@holeybit
Copy link
Author

holeybit commented May 1, 2019

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!

@sreya
Copy link
Collaborator

sreya commented May 1, 2019

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

@martimarkov
Copy link

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

@fabianmu
Copy link

fabianmu commented May 5, 2020

I'd also love to see macos as remote machine

@nhooyr
Copy link
Contributor

nhooyr commented May 5, 2020

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

@nhooyr nhooyr reopened this May 5, 2020
@fabianmu
Copy link

fabianmu commented May 6, 2020

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

@judewang
Copy link

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

@nhooyr
Copy link
Contributor

nhooyr commented May 20, 2020

Coming soon ;)

@nhooyr
Copy link
Contributor

nhooyr commented May 20, 2020

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

@judewang
Copy link

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

@fabianmu
Copy link

Any updates on this @nhooyr ?

@nhooyr
Copy link
Contributor

nhooyr commented Jun 18, 2020

See #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 coder/code-server#1729

@fabianmu
Copy link

Oh that works, splendid, thanks @nhooyr!

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

7 participants