Better SSH handling #6
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement better SSH handling.
Maybe functional programming.
Inspiration:
https://github.com/melbahja/goph
https://stackoverflow.com/questions/35906991/go-x-crypto-ssh-how-to-establish-ssh-connection-to-private-instance-over-a-ba
You can do this even more directly with the "x/crypto/ssh" without the
nc
command, since there is a method to dial a connection from the remote host and presents it as a net.Conn.Once you have an
ssh.Client
, you can use theDial
method to get a virtual net.Conn between you and the final host. You can then turn that into a newssh.Conn
withssh.NewClientConn
, and create a newssh.Client
withssh.NewClient