SSH error cannot Forward or Listen "bind: Cannot assign requested address"

debug1: Local connections to LOCALHOST:18006 forwarded to remote address 192.168.1.93:8006
debug1: Local forwarding listening on 127.0.0.1 port 18006.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on ::1 port 18006.
bind: Cannot assign requested address

What we are seeing is that we can't listen on an IPV6 address of ::1.  We need to tell SSH to stop using IPV6 so we'll edit ssh_config to take care of this issue. 

Solution:


sudo vi /etc/ssh/ssh_config

 

Set this:


Host *
AddressFamily inet

 

Formerly the "inet" would say any which means it would be IPV6 too but we can't have that since it breaks out forwarding!

The "inet" in address family disables IPV6 because we can see in the SSH verbose output earlier that it was trying to listen on ::1 (which is an IPV6 address).  This breaks if you don't have IPV6 enabled in your OS which is why we get the message from bind.


Tags:

ssh, bind, assign, requested, debug, connections, localhost, forwarded, forwarding, listener, ipv, ll, edit, ssh_config, sudo, vi, etc, addressfamily, inet, formerly, quot, disables, verbose, output, enabled, os,

Latest Articles

  • Bad Power Supply Issue Story Diagnosing Troubleshooting
  • Getting started with AI (Artificial Intelligence) in Linux / Ubuntu using by deploying LLM (Language Learing Models) using Ollama LLMA
  • microk8s kubernetes how to install OpenEBS
  • Flash LSI MegaRAID 2208 to IT mode in Linux Mint/Debian/Ubuntu
  • LSI MegaRAID in Linux Ubuntu / Centos Tutorial Setup Guide megacli
  • Convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/413. convert-im6.q16: no images defined `pts-time.jpg' @ error/convert.c/ConvertImageCommand/3258. solution ImageMagick P
  • Apache PHP sending expires header solution cannot use cache with CDN
  • How to install virt-manager in Mint 22/Ubuntu 22
  • Infiniband Guide
  • python mysql install error: /bin/sh: 1: mysql_config: not found /bin/sh: 1: mariadb_config: not found /bin/sh: 1: mysql_config: not found mysql_config --version
  • FreePBX 17 How To Add a Trunk
  • Docker Container Onboot Policy - How to make sure a container is always running
  • FreePBX 17 How To Add Phones / Extensions and Register
  • Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes. solution
  • Cisco How To Use a Third Party SIP Phone (eg. Avaya, 3CX)
  • Cisco Unified Communication Manager (CUCM) - How To Add Phones
  • pptp / pptpd not working in DD-WRT iptables / router
  • systemd-journald high memory usage solution
  • How to Install FreePBX 17 in Linux Debian Ubuntu Mint Guide
  • How To Install Cisco's CUCM (Cisco Unified Communication Manager) 12 Guide