sshcode to a MacOS
Is sshcode supposed to work connecting to a Mac?
wget -N https://codesrv-ci.cdr.sh/latest-linux
- looks like it tries to download linux version.
-
wgetis not available by default. (curl is)
cheers,
We haven’t tried to support it yet.
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.
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.
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
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!
Ah that makes sense, thanks for your interest in the project! Please don't hesitate to file additional issues as you come across them
@holeybit where did you get the binary for code-server?
I'd also love to see macos as remote machine
Yes will reopen, I'm sure people have Mac minis lying around they wanna use.
Ace, thanks! That's exactly my case - my main machine is a mac mini in the office that I would like to connect to.
Me, too. In my case, I really want to replace my 15” MacBook Pro with iPad Pro + iMac.
Coming soon ;)
@judewang You wouldn't be able to use sshcode on an iPad though.
@nhooyr I forgot... Only thought about I have ssh client on my iPad.
Any updates on this @nhooyr ?
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
Oh that works, splendid, thanks @nhooyr!