79571390

Date: 2025-04-13 09:41:33
Score: 1
Natty:
Report link

Add the debug to your agent to your java program or server


java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar your-app.jar

Use the below command to port forward using your bastion host

ssh -i ~/.ssh/remote.pem  -o "ProxyCommand ssh -i jumpboxkey.pem  -W %h:%p ec2-user@<bastion-public-ip>"  ec2-user@<private-ec2-ip>  -L 5005:localhost:5005

Connect Intellij

Also there is a more secured approach to do the same using SSM port forwarding check the below article

https://aws.amazon.com/blogs/mt/use-port-forwarding-in-aws-systems-manager-session-manager-to-connect-to-remote-hosts/

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Vikram S