First generate private and public keys
go run ssh/keygen/main.go
It should output a mykey.pem and mykey.pub, copy into another set for server and name it server.pem and server.pub
Using server and client code
- Start up ssh server on original terminal
go run ssh/server/main.go
- Open a second terminal tab and execute client
go run ssh/client/main.go
- Observe output from both terminal tabs
Using only server code and separate terminal invocation
- Start up ssh server on original terminal
go run ssh/server/main.go
- Open a second terminal tab and execute
ssh localhost -p 2022 -i mykey.pem 'whoami'
- Observe output from both terminal tabs
- On original terminal
go run dns/main.go
- Open up second terminal tab and perform some dns commands
$> dig @127.0.0.1 google.com
$> dig @127.0.0.1 nba.com
- Observe output in original terminal
go test -v ./dns/pkg