CoreTunnel and the AWS Session Manager Plugin for the AWS CLI

I use CoreTunnel to connect to my non-public RDS databases in AWS. I am currently doing this through a standard SSH tunnel and everything is working great.

AWS recently announced AWS session manager, a new service for connecting to private AWS resources without tunneling through a publicly available box. They also introduced a plugin that makes it easier to set everything up locally: (Optional) Install the Session Manager plugin for the AWS CLI - AWS Systems Manager.

It would be great to be able to use the AWS session manager plugin with CoreTunnel. I've attempted configure CoreTunnel in two different ways.

First by using the ProxyCommand and IdentityFile settings in Advanced:

ProxyCommand = aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters portNumber=%p`
IdentityFile - ~/.ssh/key

I set this up along with the AWS instance ID as my host. This outputs the following command:

ssh -i ~/.ssh/key -vvv -L 5439:AWSDB:5439 -o ServerAliveInterval=15 -o ProxyCommand="aws - ssm start-session --target %h --document-name AWS-StartSSHSession --parameters portNumber=%p" -o ExitOnForwardFailure=yes -o ServerAliveCountMax=3 ec2-user@i-ID

I also attempted to configure this in my local ssh config file

Host i-* mi-*
    ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"
    IdentityFile ~/.ssh/key
    User ec2-user

Neither of these options seem to work with CoreTunnel however both work on the command line. It could be that the AWS session-manager-plugin is binding to ssh somehow and CoreTunnel is using it's own version. Do you know if this is supported at all or if there is any plans for future support?


Sorry for late reply, could you please send me the connection log?

BTW, do you have Core Helper enabled?

Kindly regards,

Hi, sorry to resurrect an old topic, but I have the same exact question, and can provide redacted logs. I've installed Core Helper.

Could it be a path issue? It doesn't find the aws command without the full path, unlike my usual shells.

Equivalent Command: ssh -4 -i "/Users/aleksikallio/Library/Group Containers/" -vvv -L -o ExitOnForwardFailure=yes -o ProxyCommand="sh -c "/usr/local/bin/aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters \"portNumber=%p\""" -o ServerAliveInterval=300 -o ServerAliveCountMax=2 ec2-user@i-REDACTED
07:36:14 Connecting…
07:36:14 Using Core Helper 5.0 (r50)
07:36:14 OpenSSH_8.4p1, OpenSSL 1.1.1g  21 Apr 2020
07:36:14 debug1: Reading configuration data /Users/aleksikallio/.ssh/config
07:36:14 debug1: /Users/aleksikallio/.ssh/config line 54: Applying options for i-*
07:36:14 debug1: Reading configuration data /etc/ssh/ssh_config
07:36:14 debug1: /etc/ssh/ssh_config line 47: Applying options for *
07:36:14 debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/aleksikallio/.ssh/known_hosts'
07:36:14 debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/aleksikallio/.ssh/known_hosts2'
07:36:14 debug1: Executing proxy command: exec sh -c "/usr/local/bin/aws ssm start-session --target i-REDACTED --document-name AWS-StartSSHSession --parameters \\"portNumber=22\\""
07:36:14 Jumping…
07:36:14 debug1: identity file /Users/aleksikallio/Library/Group Containers/ type 0
07:36:14 debug1: identity file /Users/aleksikallio/Library/Group Containers/ type -1
07:36:14 debug1: identity file /Users/aleksikallio/Google Drive File Stream/My Drive/REDACTED/REDACTED type 0
07:36:14 debug1: identity file /Users/aleksikallio/Google Drive File Stream/My Drive/REDACTED/REDACTED-cert type -1
07:36:14 debug1: Local version string SSH-2.0-OpenSSH_8.4
SessionManagerPlugin is not found. Please refer to SessionManager Documentation here:
07:36:17 kex_exchange_identification: Connection closed by remote host
07:36:17 Connection closed by UNKNOWN port 65535
07:36:17 Abnormal Disconnect
07:36:17 Connection failed, retry after 3s…
07:36:17 Disconnected

Hi Aleksi, thank you for the connection log, is it convenient for you share redacted .ssh/config?

Kindly Regards,


Hi Yang,

Sure, here's the relevant part.

Host i-* mi-*
  User ec2-user
  ServerAliveInterval 300
  ServerAliveCountMax 2
  IdentityFile "~/Google Drive File Stream/My Drive/REDACTED/REDACTED"
  ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters \"portNumber=%p\""

It seemed aws could not found SessionManagerPlugin, which according to the official doc:

The installer installs the Session Manager plugin at /usr/local/sessionmanagerplugin and creates the symlink session-manager-plugin in the /usr/local/bin directory.

For identifying this issue, could you please replace ~/Library/LaunchAgents/ with following content?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
                <string>/Users/yang/Library/Group Containers/</string>

Then execute commands in sequence:

launchctl unload ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/

After above steps, Core Helper should able to tell aws to find the plugin from the PATH environment.

Kindly Regards,


That fixed it! So it was just a path issue, thanks for the quick fix! Is this something that could be added to the preferences screen in the future to avoid having to edit the plist file?

1 Like

Thank you for help identifying. Sure, will add an option to allow passing environment variables to ssh components, in next update, hopefully :smiley:

Kindly Regards,


Hi Yang,

Any timeline on the next update? Hoping to roll this out to the rest of the company.

Hi Aleksi, it is very promising to come out this month, we are working on final part of the update.

Kindly Regards,


Hi @yang ,

I can't see the environment variable setting in the new version (3.0), was it dropped from this release?

Hello Aleksi,

For making SSH infrastructure reusable in iOS version of Core Shell, the middleware between underlying SSH infrastructure and Core Shell/ Tunnel UI logic was refactored dramatically since our last conversation.

The refactoring has led the deadline of version 3 extended repeatedly, I've to postpone the implementation of environment variable preferences.

I'm sorry for didn't tell you the delay. But don't worry, it's absolutely on the list of version 3.1, we will make a release after collect sufficient bug reports, before end of this month.



Hi Aleksi, we just released Core Tunnel 3.5 Beta, and invited you join our Beta Program.

With 3.5 beta, you can set environment variables in Preferences -> Advanced, please let me know if you have any suggestions or bug reports on this feature.

Thanks you very much,