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

  • 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
  • Cisco CME How To Configure SIP Trunk VOIP
  • Virtualbox host Only Network Error Failed to save host network interface parameter - Cannot change gateway IP of host only network
  • Cisco CME and C7200 Router Testing and Learning Environment on Ubuntu 20+ Setup Tutorial Guide
  • Abusive IP ranges blacklist
  • How to Install Any OS on a Physical Drive from Windows Using VMware Workstation (Linux, Windows, BSD)
  • CDN Cloudflare how to set and preserve the real IP of the client without modifying application code on Apache
  • CentOS 7 fix Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container error was 14: curl#6 -
  • Ubuntu Debian How To Install Recommended Packages Automatically
  • How to set Linux Ubuntu Redhat Debian Command Line http https socks proxy for yum apt
  • How to resize a pdf without losing much quality in Linux Mint Ubuntu Debian Redhat Solution
  • qemu: could not load PC BIOS 'bios-256k.bin' solution
  • Proxmox How To Custom Partition During Install
  • Hyper-V Linux VM Boots to Black Screen, Storage, NIC Not Found Issues
  • Ubuntu Mint How to Fix Missing/Broken /dev and /dev/pts which causes terminal to immediately close exit and not work
  • How high can a Xeon CPU get?