Ansible connection - administratively prohibited

NethServer Version: latest

I like to use ansible on Nethserver (controlhost)… I tried to connect to another Nethserver (jumphost) and use it to configure a server behind but got this error:

ansible xxx_proxmox -a "df -h /" -o

192.168.xxx.xxx | UNREACHABLE!: Failed to connect to the host via ssh: channel 0: open failed: administratively prohibited: open failed
stdio forwarding failed
ssh_exchange_identification: Connection closed by remote host

Can someone help me please to configure the jumphost?

@fausp

Hi

How is the jumphost set up? Any SSH keys or certs in use for auth?

If not, make sure you exchange at least SSH keys between jumphost, your PC/Notebook, and the other server behind the jumphost.

Once that works, you can set more options in the /etc/ssh/sshd_conf…
(eg forwarding…)

Don’t forget to restart sshd with systemctl restart ssh

My 2 cents
Andy

1 Like

Finally It is working, I had to setup

  • DNS-entries for each target on the jumphosts and
  • a file for the proxyjump called config: /root/.ssh/config on the controlhost

The content of config looks like this:

grafik

  • And also the Ansible inventory under /etc/ansible/hosts with the targethosts
2 Likes