Go help for non coder

Hi There,

First of all, sorry if this should be under networking or another category. I’m working on setting up an SSH Honeypot, but most of them seem to be in Go. I follow the instructions on the git site and keep getting the below text when trying to “go build main.go”.

[email protected]********:~/gohoney# go build main.go
main.go:4:2: cannot find package “Google Code Archive - Long-term storage for Google Code Project Hosting.” in any of:
/usr/lib/go-1.13/src/code.google.com/p/gosshnew/ssh (from $GOROOT)
/root/go/src/code.google.com/p/gosshnew/ssh (from $GOPATH)
main.go:5:2: cannot find package “code.google.com/p/gosshnew/ssh/terminal” in any of:
/usr/lib/go-1.13/src/code.google.com/p/gosshnew/ssh/terminal (from $GOROOT)
/root/go/src/code.google.com/p/gosshnew/ssh/terminal (from $GOPATH)

What is the best way to add dependencies? I keep googling and although I did go get “go get github.com/jpg0/fleet/third_party/code.google.com/p/gosshnew/ssh” which I think should have removed one of the dependencies it doesn’t fix it. Thanks!

It hasn’t been updated in almost a decade - since 2013.

Modern go software is expected to use modules - some of the things here would need to be done: Migrating to Go Modules - The Go Programming Language

you should use go get ./... to have it fetch dependencies based on imports and put them in $GOPATH (~/go by default) which is kind of like a workspace for building various things.

1 Like