Score:0

Why I can not set up bastion host tunnel to private EC2? Permission denied

in flag

I have bastion host and private EC2 instance in the same VPC. I am trying to set up bastion host tunnel to private EC2

[ec2-user@ip-10-0-1-130 ~]$ ssh -L 4000:10.0.0.146:22 [email protected]
Permission denied (publickey,gssapi-keyex,gssapi-with-mic)

Instance summary inbound rules enter image description here

Source enter image description here

I tried this ssh -v -N -A -J [email protected] -L 4001:localhost:8000 [email protected]

it shows

OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Setting implicit ProxyCommand from ProxyJump: ssh -l ec2-user -v -W '[%h]:%p' 54.227.127.12
debug1: Executing proxy command: exec ssh -l ec2-user -v -W '[10.0.0.146]:22' 54.227.127.12
.......
debug1: Next authentication method: publickey
debug1: Offering public key: /home/miki/.ssh/id_ed25519 ED25519 SHA256:oqIjNOXpnWfQd/VKL9jCCCJFEUKnIKuuG2LGRMV22AQ agent
debug1: Server accepts key: /home/miki/.ssh/id_ed25519 ED25519 SHA256:oqIjNOXpnWfQd/VKL9jCCCJFEUKnIKuuG2LGRMV22AQ agent
debug1: Authentication succeeded (publickey).
Authenticated to 10.0.0.146 (via proxy).
debug1: Local connections to LOCALHOST:4001 forwarded to remote address localhost:8000
debug1: Local forwarding listening on ::1 port 4001.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 4001.
debug1: channel 1: new [port listener]
debug1: Requesting [email protected]
debug1: Entering interactive session.

why I do not get login to [email protected]

what is wrong? How to set up tunnel?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.