I am creating a command-line tool that dynamically finds a server from our cluster, then based on the cluster retrieves the appropriate private key held in an Amazon s3 bucket and copies it to a tempfile locally to connect to the server.
How would I SSH into an IP address and then allow the user to interact with the SSH session?
This example would open a ssh session to a machine in the cluster named "platform":
company_name ssh:platform
I've done this before in Ruby like so:
exec("ssh -i #{private_key_file.path} -R 52698:localhost:52698 core@#{platform_ip}")