Skip to content

Commit

Permalink
Merge pull request #214 from matttbe/ssh-localhost
Browse files Browse the repository at this point in the history
ssh: only export the port to localhost
  • Loading branch information
arighi authored Jan 4, 2025
2 parents f564701 + 0d26e0e commit a38cc40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virtme/commands/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ def ssh_server(args, arch, qemuargs, kernelargs):

# Setup a port forward network interface for the guest.
qemuargs.extend(["-device", "%s,netdev=ssh" % (arch.virtio_dev_type("net"))])
qemuargs.extend(["-netdev", "user,id=ssh,hostfwd=tcp::%d-:22" % args.port])
qemuargs.extend(["-netdev", "user,id=ssh,hostfwd=tcp:127.0.0.1:%d-:22" % args.port])


# Allowed characters in mount paths. We can extend this over time if needed.
Expand Down

0 comments on commit a38cc40

Please sign in to comment.