Question
Thread display: Collapse - |
All Answers
Share your knowledge
Start or search
Create a new discussion
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
Port Forward via Bastion in 1 command?
A command I tried sort of gets 50% of the way there but I'm hoping someone knows a better or improved method than below:
ssh -n -T -L [local_port]:localhost:[bastion_port] user1@bastion_host 'ssh -o StrictHostKeyChecking=no -n -T -L [bastion_port]:localhost:[remote_port] user1@remote_host'
(the above ssh's port forwarding to the bastion, then uses the same ssh session to launch a second ssh session to the target host. The problem is that it doesn't prompt for the second password and just prints
"Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password,keyboard-interactive)."
Any ideas?