This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Specifically we are trying to do 2 things with the erlang `:ssh` module: | |
# Make a connection (use :ssh.connect/4`) and pass in the ssh key from something other than a file on disk | |
# And then with an open connection, bind the connection to a local port (i.e. setup a ssh tunnel) | |
# use :ssh.tcpip_tunnel_to_server/5 or :ssh.tcpip_tunnel_to_server/6 | |
# Example (working) code: | |
defmodule SSHTunnel do | |
@local_port 9999 | |
@remote_port 1234 |