So I'm essentially trying to do this:
ssh [email protected] -t ssh bob2@test-vm the above works fine if I just put it into the terminal, however I am having a hard time trying to replicate it via the .ssh config file.
Here's what I have inside the config file:
Host bastion HostName 35.192.152.35 User bob2 Host test-vm User bob2 FOrwardAgent yes ProxyCommand ssh bastion nc %h %p 2> /dev/null However it comes up with an error saying "permission denied", invalid public key file? I came up with the above from this post: https://unix.stackexchange.com/questions/124078/how-to-ssh-to-a-server-using-another-server-with-key-from-the-second-server
Somehow it worked for the guy, but doesn't seem to work for me. I also tried allowing agent forwarding and TCP forwarding in the sshd_chroot config as well on all parties (origin, bastion, and server), but that didn't make a difference.
if I force specify the identity paths:
Host bastion HostName 35.192.152.35 User bob2 IdentityFile /Users/bob/.ssh/id_rsa Host test-vm User bob2 FOrwardAgent yes ProxyCommand ssh bastion nc %h %p 2> /dev/null IdentityFile /home/bob2/.ssh/id_ed25519 Then it comes up with the same error, in addition to saying that it couldn't find the directory "/home/bob2/.ssh/id_ed25519"
Anyone got any ideas?