Summary

After reading this chapter, you should now understand how to use the Go SSH client to connect and authenticate using a password or a private key. In addition, you should now understand how to execute a command on a remote server or how to begin an interactive session.

How would you apply an SSH client programmatically? Can you think of any use cases? Do you manage multiple remote servers? Could you automate any tasks?

The SSH package also contains types and functions for creating an SSH server, but we have not covered them in this book. Read more about creating an SSH server at https://godoc.org/golang.org/x/crypto/ssh#NewServerConn and more about the SSH package overall at https://godoc.org/golang.org/x/crypto/ssh.

In the next chapter, ...

Get Security with Go now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.