How to transfer files between pcs on same network

Technical issues/questions of an intermediate or advanced nature.
User avatar
Ed_P
Contributor
Contributor
Posts: 5106
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

How to transfer files between pcs on same network

Post#1 by Ed_P » 29 Sep 2019, 06:20

I can connect to the other pcs via TightVNC but I'm unable to figure out how I can transfer files between them other than email. :unknown:
Ed

burdi01
Samurai
Samurai
Posts: 108
Joined: 18 Aug 2013, 12:09
Distribution: Slackware, Xubuntu
Location: The Netherlands

How to transfer files between pcs on same network

Post#2 by burdi01 » 29 Sep 2019, 09:40

SFTP should do the trick out of the box.
But FTP, Samba and NFS are possibilities too.
:D

User avatar
Blaze
DEV Team
DEV Team
Posts: 2691
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

How to transfer files between pcs on same network

Post#3 by Blaze » 29 Sep 2019, 15:34

Linux 5.4.0-rc7-porteus #2 SMP Tue Nov 12 17:45:45 UTC 2019 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
Ed_P
Contributor
Contributor
Posts: 5106
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

How to transfer files between pcs on same network

Post#4 by Ed_P » 29 Sep 2019, 21:39

Ok, more information. Wire is not an option, looking for WiFi means. The pc I connect to via TightVNC is a Windows system, Windows 7, running another VNC app. I can transfer files to the pc using Windows but lack the know how to do it with Porteus.

Does Porteus have SFTP or do I need to download an app for it? Basically I'm looking to create a script to backup files to other pcs.
Ed

fulalas
DEV Team
DEV Team
Posts: 1454
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

How to transfer files between pcs on same network

Post#5 by fulalas » 30 Sep 2019, 00:36

Usually Porteus has Samba working, so you should see Windows networks. Regarding SFTP, yes, it works out of the box for all DEs. But AFAIK it only works between Linux machines.

Shadow0815
White ninja
White ninja
Posts: 17
Joined: 16 Jul 2015, 03:50
Distribution: Manjaro, Arch
Location: DE

How to transfer files between pcs on same network

Post#6 by Shadow0815 » 30 Sep 2019, 08:14

if you install cygwin with sshd server on win7 you can use ssh (including automated copy script if you configure for passwordless key login)
(search tutorial how to setup ssh on win7 cygwin)

ssh can use:
ssh sftp rsync scp (secure copy "the cp over netwok") sshfs (for mounting remote folders)

learning how ssh ticks and works (how to set it up, config it) is not easy for a beginner but it is cool and easy when setup right.

then i just

scp filename.jpg win7pc:/cygdrive/c/pics

to copy the image file to win7 in the pics folder on c

win7pc is the name of the computer that you config in your ~/.ssh/config file

bonus: ssh is always encrypted so you can also transfer over internet securely

and i use sshelper on my android phone, so i can even:

scp file.jpg phone:

(if there is nothing after : it mans the home folder of target machine)
scp file.jpg phone:la means: ~/la on the target machine


I USE STATIC IPS ON MY MACHINES+ANDROID IN THE NETWORK so i can easy write them into the HOST part in ~/.ssh/config

User avatar
Ed_P
Contributor
Contributor
Posts: 5106
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

How to transfer files between pcs on same network

Post#7 by Ed_P » 30 Sep 2019, 16:49

More info Shadow. The Windows 7 pc has RealVNC VNC Server 4 running on it. IP 192.168.200.100 port 5900
Ed

User avatar
Blaze
DEV Team
DEV Team
Posts: 2691
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

How to transfer files between pcs on same network

Post#8 by Blaze » 30 Sep 2019, 17:13

Ed_P, if need VNC Server in Porteus - look at this post Поднимаем x11vnc сервер в Porteus (Пост Blaze #48319)
I use VNC Viewer application on my home Porteus PC for remote connect to VNC server (job PC with Porteus)
Linux 5.4.0-rc7-porteus #2 SMP Tue Nov 12 17:45:45 UTC 2019 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
Ed_P
Contributor
Contributor
Posts: 5106
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

How to transfer files between pcs on same network

Post#9 by Ed_P » 30 Sep 2019, 18:09

Thank you Blaze. I use TightVNC's vncviewer on Porteus to connect to the RealVNC VNC Server (user) on the Windows pc. Access is great, I just need a more convenient way to upload files to it without having to reboot from Porteus to Windows 10 to do it. :(
Ed

burdi01
Samurai
Samurai
Posts: 108
Joined: 18 Aug 2013, 12:09
Distribution: Slackware, Xubuntu
Location: The Netherlands

How to transfer files between pcs on same network

Post#10 by burdi01 » 01 Oct 2019, 08:35

@Ed_P: What is holding you back from installing an FTP or SSH/SFTP server on your Win7/10 box? Tutorials abund on the net.
:D

User avatar
Ed_P
Contributor
Contributor
Posts: 5106
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

How to transfer files between pcs on same network

Post#11 by Ed_P » 01 Oct 2019, 15:05

:lol: Because burdi01 I can transfer files to it when I boot to Windows on my notebook. And IMO if I can do it in Windows I should be able to do it in Linux. Without adding anything to it. ;)
Ed

Shadow0815
White ninja
White ninja
Posts: 17
Joined: 16 Jul 2015, 03:50
Distribution: Manjaro, Arch
Location: DE

How to transfer files between pcs on same network

Post#12 by Shadow0815 » 02 Oct 2019, 08:17

Put this code snippet into ~/.bashrc

Code: Select all

serve() { 
	ip=$(nmcli -p device show|grep 'IP4\.ADDRESS'|grep -v '127\.0\.0\.1'|sed 's;/24;;g'|awk {'print $2'})
	echo "Connect to: http://$ip:8000"

    if hash python3 2>/dev/null; then
        python3 -m http.server;
    elif hash python2 2>/dev/null; then
        python2 -m SimpleHTTPServer;
    fi
}

cd to folder you want to download from
enter: serve
url address is shown where to browse to

open browser in windows and download the files:
http://<IP>:8000

ctrl+c to stop the server
only one folder can be served at a time (close the serving terminal if not sure when you want to serve another folder)

User avatar
Ed_P
Contributor
Contributor
Posts: 5106
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

How to transfer files between pcs on same network

Post#13 by Ed_P » 02 Oct 2019, 15:48

:shock: An impressive script Shadow0815. :o And an interesting command: nmcli. I can see what I'll be doing today. :D

Thank you. :friends:
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 5106
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

How to transfer files between pcs on same network

Post#14 by Ed_P » 02 Oct 2019, 18:32

-update-

Code: Select all

guest@porteus:~$ nmcli -p device show|grep 'IP4\.ADDRESS'
IP4.ADDRESS[1]:                         192.168.200.204/24
IP4.ADDRESS[1]:                         127.0.0.1/8
guest@porteus:~$ echo $(nmcli -p device show|grep 'IP4\.ADDRESS'|grep -v '127\.0\.0\.1'|sed 's;/24;;g'|awk {'print $2'})
192.168.200.204

guest@porteus:~$ ./test.sh
Connect to: http://192.168.200.204:8000
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
192.168.200.204 - - [02/Oct/2019 13:32:54] "GET / HTTP/1.1" 200 -
192.168.200.204 - - [02/Oct/2019 13:32:56] code 404, message File not found
192.168.200.204 - - [02/Oct/2019 13:32:56] "GET /favicon.ico HTTP/1.1" 404 -
192.168.200.204 - - [02/Oct/2019 13:32:57] code 404, message File not found
192.168.200.204 - - [02/Oct/2019 13:32:57] "GET /favicon.ico HTTP/1.1" 404 -
When I connect to http://192.168.200.204:8000 in my browser I see all the files and folders in my /home/guest/ folder. When I change to the address of the Windows pc http://192.168.200.100:8000 it doesn't connect.
When I change to the address of the Windows pc's VNC server http://192.168.200.100:5900 it connects but I don't see any files or folders, just "RFB 003.008".
In Windows I reference the remote Windows pc with \\AMD_XP_2000\Temp\ but that address didn't work in Porteus either.
Ed

burdi01
Samurai
Samurai
Posts: 108
Joined: 18 Aug 2013, 12:09
Distribution: Slackware, Xubuntu
Location: The Netherlands

How to transfer files between pcs on same network

Post#15 by burdi01 » 03 Oct 2019, 10:24

Ed_P wrote:
01 Oct 2019, 15:05
Because burdi01 I can transfer files to it when I boot to Windows on my notebook. And IMO if I can do it in Windows I should be able to do it in Linux. Without adding anything to it.
If I understand you correctly the crux of your problem is this "Without adding anything to it". And is that "it" your Windows box, your Linux one or both?
In your Windows to Windows case I presume you are using a Windows share. From Linux you should be able to access that share via "mount -t cifs ..." and upload to it without adding anything to either one of boxes.
In the "Shadow0815" case you are add something to your Linux box and then go to the Windows box to download via that Linux something. I think using an FTP server as that Linux something would be the simplest option then.
:D

Post Reply