2

I would like to scp some large files from my lubuntu laptop to windows desktop. The ip address retrieved with ip -a command however only allows me connect from the laptop to itself. Router or modem is Technicolor tg558v, provider Carrytel (probably Bell reseller). Probably dynamic ip.

Workarounds that I am aware. I know I can buy a portable drive but would prefer a free solution. Fallback I am aware is Google Drive which is fine to pass smaller files (below 15G) or file chunks, but hope that scp or rsync could be faster/more convenient. Model/router is technicolor, both have wifi albeit slower than wired connection.

Se Bo
  • 143
  • 1
  • 2
  • 7
  • install git bash on windows desktop, which comes with ssh functionality, `ssh`, `ssh-keygen`, `scp`, etc. get ip address with `ipconfig` on windows and `ifconfig` on linux. get on windows pc and `scp 192.168.x.x:~/file.large .` – Dave Ankin Jun 09 '20 at 19:30
  • Neither finding the IP address of a Windows desktop, setting up open_sshd on Windows, nor configuring a router for Port Forwarding are related to Ubuntu. Those seem like basic networking questions suitable for Stack Exchange or any Search Engine. – user535733 Jun 09 '20 at 19:51
  • 1
    askubuntu is on Stack Excange, if you know better Stack Exchange forum please suggest. I did not ask ip address of Windows machine or how to install sshd there. – Se Bo Jun 09 '20 at 20:48

1 Answers1

3

Your router shares your public internet IP address among all the devices on your local network (LAN).

Here's an example.

The (local) LAN address of my laptop is provided con be provided several ways: It's 192.168.1.6

$ ip addr | grep inet
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
    inet 192.168.1.6/24 brd 192.168.1.255 scope global dynamic noprefixroute enp3s0
    inet6 2603:6000:a540:1678:7d12:5d46:507e:9f79/64 scope global temporary dynamic 


$ hostname -I
192.168.1.6 2603:6000:a540:1678:7d12:5d46:507e:9f79 2603:6000:a540:1678:dd8:8ed5:30bb:81a0 

My public internet address can be queried from the router (login required), from Google ("What is my IP address?") or from any number of internet services: We will pretend that it's 123.45.67.89

$ wget -qO- ifconfig.co
123.45.67.89

Inbound connections from the internet go to your router. Your router decides which machine on your LAN gets the packet. That's why it's called a router: It routes the packets between the networks.

You must create a Port Forwarding rule on your router (not on your Ubuntu system) to tell the router what to do with, say, inbound ssh connections. Your router is not psychic - it needs to be told to Forward inbound ssh connections to 192.168.1.6.

After that, it's easy:

If I want to SSH to my laptop from another machine on the same LAN: ssh 192.168.1.6

If I want to SSH to my laptop from anywhere else on the internet: ssh 123.45.67.89. The router will automatically forward the connection to 192.168.1.6.

user535733
  • 58,040
  • 10
  • 106
  • 136