wilas / vbkick

Tool for building and maintaining VirtualBox VMs described as a code in a single definition file.
Other
8 stars 5 forks source link

problem with connection to localhost, e.g. ssh, scp hangs #33

Closed wilas closed 10 years ago

wilas commented 10 years ago

An example commands which hangs:

printf "" > /dev/tcp/localhost/$port_nr
ssh -q "${ssh_user}@localhost" -t -i ${key_path} -p $ssh_host_port $ssh_options -C "${cmd}"

but these works:

nc -zv localhost $port_nr
lsof -i tcp:$port_nr -stcp:listen

The problem appear when IPV6 is enabled and /etc/hosts contain: ::1 localhost

Solution: localhost must be replaced by 127.0.0.1 in vbkick.