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

  • 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
  • Linux Ubuntu Redhat How To Extract Images from PDF
  • Linux and Windows Dual Boot Issue NIC Won't work After Booting Windows
  • Cisco CME How To Enable ACD hunt groups
  • How to install gns3 on Linux Ubuntu Mint
  • How to convert audio for Asterisk .wav format
  • Using Cisco CME Router with Asterisk as a dial-peer