Remote Desktop Utility for Amazon EC2.
This tool assists you to easily connet to your EC2 instances with Remote Desktop Client.
- Windows, (Experimental) macOS
- Parallels Client 19+ is needed on macOS
- (Optional) AWS CLI 2.12.0+
- Required when using
ec2rdp eice
command
- Required when using
- (Optional) Session Manager plugin
- Required when using
ec2rdp ssm
command
- Required when using
ec2:DescribeInstances
ec2:GetPasswordData
ec2:DescribeInstanceConnectEndpoints
ssm:DescribeInstanceInformation
ssm:StartSession
ssm:TerminateSession
ec2-instance-connect:OpenTunnel
Sample IAM policies are here.
Download ec2rdp binary and setup AWS CLI credential file.
You can use Scoop on Windows.
# Windows only
scoop bucket add stknohg https://github.com/stknohg/scoop-bucket
scoop install ec2rdp
You can use Homebrew Taps on macOS.
# macOS only
brew install stknohg/tap/ec2rdp
Connect to public EC2 instance with Remote Desktop Client.
ec2rdp public -i 'EC2 instance ID' -p 'Path to private key file (.pem)'
# Connect to EC2
PS C:\> $env:AWS_PROFILE='your_profile'
PS C:\> ec2rdp public -i i-01234567890abcdef -p C:\project\example.pem
Connect to EC2 instance with Remote Desktop Client via SSM port forwarding.
ec2rdp ssm -i 'EC2 instance ID' -p 'Path to private key file (.pem)'
# Connect to EC2
PS C:\> $env:AWS_PROFILE='your_profile'
PS C:\> ec2rdp ssm -i i-01234567890abcdef -p C:\project\example.pem
Connect to EC2 instance with Remote Desktop Client via EC2 Instance Connect Endpoint.
ec2rdp eice -i 'EC2 instance ID' -p 'Path to private key file (.pem)'
You can also use --endpointid
(-e
) flag to specify EC2 Instance Connect Endpoint ID.
ec2rdp eice -e 'Endpoint ID' -i 'EC2 instance ID' -p 'Path to private key file (.pem)'
# Connect to EC2 via endpoint in the same VPC
PS C:\> $env:AWS_PROFILE='your_profile'
PS C:\> ec2rdp eice -i i-01234567890abcdef -p C:\project\example.pem
# Connect to EC2 via spcecified endpoint
PS C:\> ec2rdp eice -e eice-xxxxxxxxxx -i i-01234567890abcdef -p C:\project\example.pem
You can use --profile
, --region
parameters.
PS C:\> ec2rdp public -i i-01234567890abcdef -p C:\project\example.pem --profile your_profile --region ap-northeast-1
You can override RDP connection settings by --port
, --user
, --password
parameters.
PS C:\> ec2rdp ssm -i i-01234567890abcdef --port 3390 --user MyAdmin --password