You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command I need to use in the java equivalent to the openssh ProxyCommand is some AWS-supplied abomination written in go, but for the purposes of the java code is just a process that communicates via stdin/stdout.
Hoping you can give me some tips on what I need to do to get this use-case to work :)
Thanks in advance,
Greg
The text was updated successfully, but these errors were encountered:
Hi there.
I'm trying to implement an SSH tunnel that uses AWS SSM ("AWS Systems Manager") commands to communicate with a host. The way this apparently works with an
openssh
client is to configure a 'ProxyCommand' directive which I believe forks a process and then sends the SSH handshake and data to/from that process instead of a socket. ( AWS docs here: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started-enable-ssh-connections.html ).I was looking around the sshj source files looking for a way of doing this, but I can't see if this has been implemented anywhere.
I can see I might be able to connect my own InputStream/OutputStreams by calling
SSHClient.connectVia()
instead of callingSSHClient.connect()
, but the only example I can find is Jump.java here: https://github.com/hierynomus/sshj/blob/master/examples/src/main/java/net/schmizz/sshj/examples/Jump.javawhich passes in a DirectConnection, but that class still seems network-oriented rather than stream-oriented.
Is what I'm looking for possible out of the box using sshj or do I have to create a new kind of Channel / Transport / Connection class ?
There is mention of proxy connections in this PR: #756 but this looks like it's referring to SOCKS/HTTP proxies rather than
ProxyCommand
sI wasn't sure how 'ProxyCommand' was implemented in
openssh
either... if it helps their implementation is here: https://github.com/openssh/openssh-portable/blob/master/sshconnect.c#L196which is called from https://github.com/openssh/openssh-portable/blob/master/ssh.c#L1641
The command I need to use in the java equivalent to the openssh
ProxyCommand
is some AWS-supplied abomination written in go, but for the purposes of the java code is just a process that communicates via stdin/stdout.Hoping you can give me some tips on what I need to do to get this use-case to work :)
Thanks in advance,
Greg
The text was updated successfully, but these errors were encountered: