Tranfer files with SSH from PC to iPhone over USB

file-transferiossshwindows

DISCLAMER : Stack Overflow closed my question and told me to post here so do not be mad at me please

Hi I am trying to tranfer files from my windows computer over to my jailbroken iPhone using openssh tweak.

First I tried using FileZilla to transfer over my wifi, at first it worked but I have a potato modem so the modem keeps rebooting

After that I want to do it over USB connection but I can't access filesystem over USB with windows explorer so I look into google and finally I found this solution but since I am not a good Linux user I am at lost. Finally I successfully connect to my iPhone's fliesystem but I am stuck there. I can't find a way to transfer files from my PC to the USB connected device even if I can access the filesystem on the device

2

Also I tried to use the scp command like this

scp E:/Grez/Downloads/test/E01.mp4 root@localhost:/var/mobile/Downloads/

but this poped out

ssh: Could not resolve hostname e: nodename nor servname provided, or not known

Finally I tried to connect via SFTP which resulted like this :

  • The connection was succesfull

  • I tried to download a file with get command

  • Success but cant find the file on my PC

  • used the pwd to see where the remote folder is : /var/mobile -> all
    good

  • used the lpwd to see where the local folder is : /var/mobile

  • so the local folder is also pointing to my iPhone so the command just
    transfered the file from my iPhone to my iPhone in an other folder
    location

Can someone tell me what is the correct command to transfer a file from E:/Grez/Downloads/E04.mp4 (PC) to /private/var/mobile/Downloads/ (iPhone)

Best Answer

thanks to Kamil's comment I finally found a way to do it

The port 2222 needs to be fowarded to remote port 22 with this tutorial. Then all is needed is to use this command

scp -P 2222 /cygdrive/windows_path/thefile.exe root@localhost:/where_ever_you_want

it will ask for the root pass then upload the file and for the reverse operation

scp -P 2222  root@localhost:/where_the_file_is/thefile.exe /cygdrive/windows_path
Related Question