If not, you would have to setup a tunnel. You might be able to pass that connection into db library. The last line above is not exactly tunneling, but an TCP connection open to DB server. Below is not a tested sample without error checking: var buffer byteīuffer, err = ioutil.ReadFile(sshKeyFile)Ĭonn, err := ssh.Dial("tcp", endpoint, sshConfig)ĭbConn, err = conn.Dial("tcp", dbEndpoint) There are tutorials out there how to use GO ssh tunneling. ![]() If external client works, then you can attempt to put it all into go language code without external SSH client. You can accomplish #1 and #2 with ssh client like OpenSSH or putty.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |