Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't manage to install on M1 Mac #36

Open
fratrik opened this issue Jan 9, 2023 · 10 comments · May be fixed by #37
Open

Can't manage to install on M1 Mac #36

fratrik opened this issue Jan 9, 2023 · 10 comments · May be fixed by #37

Comments

@fratrik
Copy link

fratrik commented Jan 9, 2023

I followed the brew instructions and got the following

sga-guard <hostname>

doesn't produce any output

Not sure what this one is, but they produce segmentation faults

> sga-guard-bin <hostname>
[1]    62556 segmentation fault  sga-guard-bin <hostname>
> sga-ssh <hostname>
[1]    62609 segmentation fault  sga-ssh <hostname>

I tried downloading go so I could install from source, but could not figure that out.

> go get github.com/StanfordSNR/guardian-agent/...
go: go.mod file not found in current directory or any parent directory.
	'go get' is no longer supported outside a module.
	To build and install a command, use 'go install' with a version,
	like 'go install example.com/cmd@latest'
	For more information, see https://golang.org/doc/go-get-install-deprecation
	or run 'go help get' or 'go help install'.

> go install github.com/StanfordSNR/guardian-agent@latest
go: finding module for package github.com/hashicorp/yamux
go: finding module for package golang.org/x/crypto/ssh/terminal
go: finding module for package golang.org/x/sys/unix
go: finding module for package golang.org/x/crypto/ssh/agent
go: finding module for package github.com/sternhenri/interact
go: finding module for package golang.org/x/crypto/ssh
go: finding module for package github.com/howeyc/gopass
go: finding module for package golang.org/x/crypto/ssh/knownhosts
go: found github.com/hashicorp/yamux in github.com/hashicorp/yamux v0.1.1
go: found github.com/howeyc/gopass in github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef
go: found github.com/sternhenri/interact in github.com/sternhenri/interact v0.0.0-20170607043113-dfeb9ef20304
go: found golang.org/x/crypto/ssh in golang.org/x/crypto v0.5.0
go: found golang.org/x/crypto/ssh/agent in golang.org/x/crypto v0.5.0
go: found golang.org/x/crypto/ssh/knownhosts in golang.org/x/crypto v0.5.0
go: found golang.org/x/crypto/ssh/terminal in golang.org/x/crypto v0.5.0
go: found golang.org/x/sys/unix in golang.org/x/sys v0.4.0
package github.com/StanfordSNR/guardian-agent is not a main package
@thearthur
Copy link

I am also having this problem

@alvg
Copy link

alvg commented Apr 24, 2023

+1

@TTimo
Copy link

TTimo commented Jul 9, 2023

This is on Linux (Arch) as well. I am not familiar with go, updated build instructions are needed.

@TTimo
Copy link

TTimo commented Jul 9, 2023

I got a little further by banging rocks (and doing this: go mod init sga ; go mod tidy ; go mod vendor ; go build)

# sga
./agent.go:54:108: undefined: ssh.Filter
./agent.go:66:33: undefined: knownhosts.OrderHostKeyAlgs
./agent.go:70:20: undefined: ssh.NewProxyConn
./agent.go:141:16: undefined: ssh.NewFilter
./delegated_client.go:608:4: unknown field KexCallback in struct literal of type ssh.Config
./delegated_client.go:611:3: unknown field DeferHostKeyVerification in struct literal of type ssh.ClientConfig
./delegated_client.go:629:44: undefined: ssh.NoMoreSessionRequestName
./delegated_client.go:631:50: undefined: ssh.NoMoreSessionRequestName
./delegated_client.go:634:51: undefined: ssh.NoMoreSessionRequestName
./delegated_client.go:652:14: c.sshClient.RequestKeyChange undefined (type *ssh.Client has no field or method RequestKeyChange)
./delegated_client.go:652:14: too many errors

@drewwells
Copy link

So, a standard library was forked for some reason. I'm not really sure why, and there's no tests. It would be challenging to update this to modern go that supports arm. I'm more interested in the underlying library to talk to mosh. It would be interesting to break that out into its own library for importing. As a gui though, it would be better suited to a gui friendly language.

StanfordSNR/crypto@182a8be

@drewwells drewwells linked a pull request Jul 20, 2023 that will close this issue
@mdella-nutanix
Copy link

Doesn't work using homebrew either for intel Macs. Looking closer it looks like the team just hasn't kept up with the OS releases in general. Is this a dead project? Looking at check ins, it looks like no movement for 3+ years.

@lunasophia
Copy link

Sadly, yes, this does appear to be a dead project. The Stanford students working on it have graduated, and the professor leading the project seems to have moved on to other projects as well. Quite a shame, as a mosh developer in mobile-shell/mosh#120 emphatically pointed people here as the One True Solution.

@keithw
Copy link
Collaborator

keithw commented Feb 3, 2024

The professor and the Mosh developer are the same person. :-) I think if somebody is willing to take this over, we're interested to hand this over and work with you. I spoke with the original developers (and somebody interested in taking this over) back on Oct. 5 and we were going to work on a transition plan, but I fear intervening events in the Middle East may have taken priority for them. :-(

@eggbean
Copy link

eggbean commented Feb 3, 2024

I don't use mac, but I use the Nix sga-guardian package for different architectures on Linux and there's one for aarch64-darwin.

If you don't use nix as a package manager, you could try extracting the binaries.

@simmel
Copy link

simmel commented Apr 19, 2024

#33 (comment) works for me™

Sadly it doesn't work with Go 1.22 since they removed GO111MODULE=off support for go get but everything I tried below it works.

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

Successfully merging a pull request may close this issue.

10 participants