I am trying to connect with server with SSH using ProxyJump. So basically I'm trying to reach target server through bastion host. Fallowing setup works on my local OSX machine but I cannot configure it on the remote Ubuntu 20.04 server. Is stops on debug1: pledge: network even though before I can see log saying debug1: Authentication succeeded (publickey). Additionally, I cannot modify target server settings.
Here're step I've taken:
apt install -y openssh-client
Put this into ssh config file:
Host bastion
Hostname 11.111.11.11
User the_user
IdentityFile ~/.ssh/bastion
IdentitiesOnly yes
ForwardAgent yes
Host target_server
Hostname target_server
User the_user
ProxyJump bastion
Placed bastion private key in ~/.ssh and public in target server
chmod 400 [private_key]
eval ssh-agent -s
ssh-add procano-servers
ssh target_server
I cannot go into the server and it is a big blocker for me. Thank you for helping.
[EDIT]: Although I cannot change sshd_config I can read it:
LogLevel VERBOSE
XAuthLocation /usr/bin/xauth
KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
PermitUserEnvironment yes
PasswordAuthentication no
PermitRootLogin no
UsePAM yes
X11Forwarding yes
TCPKeepAlive yes
ClientAliveCountMax 3
ClientAliveInterval 200
Subsystem sftp internal-sftp -l VERBOSE
AddressFamily any
PrintMotd yes
Match Host xxx-*.XXX.com User root
KbdInteractiveAuthentication no
PermitRootLogin without-password
Match User root
KbdInteractiveAuthentication no
PermitRootLogin no