[Semibug] ssh to host on local network
Carl T. Miller
carl at carltm.com
Thu Apr 28 19:19:17 EDT 2022
So...the key question. Is your router a "normal" computer
or is it a "black box" that only forwards connections.
If it's a normal computer, you should be able to ssh into
it and then ssh to your internal host. If that works you
can set up port forwarding from the internet directly
to the internal host.
If it's a black box router, just pick an unused port and
forward it to your internal host's IP and port 22.
Make sense?
c
On 4/28/22 18:44, Jonathan Drews wrote:
> Hi Folks:
>
> I want to allow a friend to SSH into a machine that is on a local
> network. It is an OpenBSD machine. My internal IP addres as given my
> ifconfig is 192.168.11.21:
>
> $ doas /sbin/ifconfig em0
>
> em0: flags=808843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,AUTOCONF4>
> mtu 1500
> lladdr 28:d2:44:b2:fb:bf
> index 1 priority 0 llprio 3
> groups: egress
> media: Ethernet autoselect (100baseTX
> full-duplex,rxpause,txpause)
> status: active
> inet 192.168.11.21 netmask 0xffffff00 broadcast 192.168.11.255
>
> my routers external IP address is 63.239.66.139:
>
> $ curl https://lathama.net/ip/
> 63.239.66.139
>
> If I do:
>
> $ ssh guesthere at 63.239.66.139
>
> It can't find the local machine. guesthere is a guest account on the
> OpenBSD computer. How do I add in the local 192.168.11.21 address?
>
> I have Michael Lucas' SSH Mastery book but I couldn't find any
> examples of ssh into machines on a local network.
>
> My machine is:
> $ uname -a
> OpenBSD leo.my.domain 7.0 GENERIC.MP#6 amd64
>
> --
> Kind regards,
> Jonathan
>
> _______________________________________________
> Semibug mailing list
> Semibug at lists.nycbug.org
> https://lists.nycbug.org:8443/mailman/listinfo/semibug
More information about the Semibug
mailing list