Skip to main content
Updated answer to the updated question (2)
Source Link
Stefan M
  • 1.6k
  • 1
  • 12
  • 20

Please try first whether the host is reachable at all. This can easily be done using nmap. For your case this should suffice:

nmap localhost -p 22

If it says that the port is open, you should look into the sshd on the guest. If it is filtered, maybe a firewall-issue on your guest (incoming) or your host (outgoing/incoming from local).

On the update:

Simply put, you have two choices:

  1. Use bridged networking for example as described in here, that way you can install the sshd.

  2. Use guestfwd. As you already established a connection (port forwarding) via qemu in one direction, you can easily do the same the other way around:

  • Install a proxy on your host (squid, tinyproxy, whatever)
  • Point the guest to your proxy: (below untested part of your command):

guestfwd=tcp::3128-:3128

  • Last, but not least: Use http_proxy for the apt commands or set the variable system-wide.

When you finally have the sshd running, you should be able to connect to the guest system via ssh.

On the second update:

If I understand the documentation correctly, you should give the IP-Adresses along as well. My guess is that you try to forward the port to the same host (possibly from guest to guest).

guestfwd=[tcp]:server:port-dev

Forward guest TCP connections to the IP address server on port port to the character device dev

So it should be something along this:

guestfwd=tcp:10.0.2.100:3128-tcp:10.10.1.1:3128

This would send all connects on the port 3128 from the guest to IP 10.10.1.1 to 10.0.2.100.

Please try first whether the host is reachable at all. This can easily be done using nmap. For your case this should suffice:

nmap localhost -p 22

If it says that the port is open, you should look into the sshd on the guest. If it is filtered, maybe a firewall-issue on your guest (incoming) or your host (outgoing/incoming from local).

On the update:

Simply put, you have two choices:

  1. Use bridged networking for example as described in here, that way you can install the sshd.

  2. Use guestfwd. As you already established a connection (port forwarding) via qemu in one direction, you can easily do the same the other way around:

  • Install a proxy on your host (squid, tinyproxy, whatever)
  • Point the guest to your proxy: (below untested part of your command):

guestfwd=tcp::3128-:3128

  • Last, but not least: Use http_proxy for the apt commands or set the variable system-wide.

When you finally have the sshd running, you should be able to connect to the guest system via ssh.

Please try first whether the host is reachable at all. This can easily be done using nmap. For your case this should suffice:

nmap localhost -p 22

If it says that the port is open, you should look into the sshd on the guest. If it is filtered, maybe a firewall-issue on your guest (incoming) or your host (outgoing/incoming from local).

On the update:

Simply put, you have two choices:

  1. Use bridged networking for example as described in here, that way you can install the sshd.

  2. Use guestfwd. As you already established a connection (port forwarding) via qemu in one direction, you can easily do the same the other way around:

  • Install a proxy on your host (squid, tinyproxy, whatever)
  • Point the guest to your proxy: (below untested part of your command):

guestfwd=tcp::3128-:3128

  • Last, but not least: Use http_proxy for the apt commands or set the variable system-wide.

When you finally have the sshd running, you should be able to connect to the guest system via ssh.

On the second update:

If I understand the documentation correctly, you should give the IP-Adresses along as well. My guess is that you try to forward the port to the same host (possibly from guest to guest).

guestfwd=[tcp]:server:port-dev

Forward guest TCP connections to the IP address server on port port to the character device dev

So it should be something along this:

guestfwd=tcp:10.0.2.100:3128-tcp:10.10.1.1:3128

This would send all connects on the port 3128 from the guest to IP 10.10.1.1 to 10.0.2.100.

Updated answer to the updated question
Source Link
Stefan M
  • 1.6k
  • 1
  • 12
  • 20

Please try first whether the host is reachable at all. This can easily be done using nmap. For your case this should suffice:

nmap localhost -p 22

If it says that the port is open, you should look into the sshd on the guest. If it is filtered, maybe a firewall-issue on your guest (incoming) or your host (outgoing/incoming from local).

On the update:

Simply put, you have two choices:

  1. Use bridged networking for example as described in here, that way you can install the sshd.

  2. Use guestfwd. As you already established a connection (port forwarding) via qemu in one direction, you can easily do the same the other way around:

  • Install a proxy on your host (squid, tinyproxy, whatever)
  • Point the guest to your proxy: (below untested part of your command):

guestfwd=tcp::3128-:3128

  • Last, but not least: Use http_proxy for the apt commands or set the variable system-wide.

When you finally have the sshd running, you should be able to connect to the guest system via ssh.

Please try first whether the host is reachable at all. This can easily be done using nmap. For your case this should suffice:

nmap localhost -p 22

If it says that the port is open, you should look into the sshd on the guest. If it is filtered, maybe a firewall-issue on your guest (incoming) or your host (outgoing/incoming from local).

Please try first whether the host is reachable at all. This can easily be done using nmap. For your case this should suffice:

nmap localhost -p 22

If it says that the port is open, you should look into the sshd on the guest. If it is filtered, maybe a firewall-issue on your guest (incoming) or your host (outgoing/incoming from local).

On the update:

Simply put, you have two choices:

  1. Use bridged networking for example as described in here, that way you can install the sshd.

  2. Use guestfwd. As you already established a connection (port forwarding) via qemu in one direction, you can easily do the same the other way around:

  • Install a proxy on your host (squid, tinyproxy, whatever)
  • Point the guest to your proxy: (below untested part of your command):

guestfwd=tcp::3128-:3128

  • Last, but not least: Use http_proxy for the apt commands or set the variable system-wide.

When you finally have the sshd running, you should be able to connect to the guest system via ssh.

Source Link
Stefan M
  • 1.6k
  • 1
  • 12
  • 20

Please try first whether the host is reachable at all. This can easily be done using nmap. For your case this should suffice:

nmap localhost -p 22

If it says that the port is open, you should look into the sshd on the guest. If it is filtered, maybe a firewall-issue on your guest (incoming) or your host (outgoing/incoming from local).