OpenWrt Forum Archive

Topic: How to transfer lua script file to TP-link Router wr703n from Laptop

The content of this topic has been archived on 18 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I am trying to copy a lua script file from PC using ubuntu to my Tp-wr703n router.
Installed putty and trying to copy to root directory.

Can you advise how this is done pls.

(Last edited by davebdublin on 14 Apr 2014, 17:11)

scp file.txt root@192.168.1.1:/tmp/

Thank you for response. Can you advise steps pls.
I have putty ssh client open.

I use Linux, "scp" is just there. Look for some Windows "scp" binary.
I don't know if Putty can transfer files.

Open Nautilus, last item on the left should be "Connect to server", type:

ssh://root@192.168.1.1/

or

sftp://root@192.168.1.1/

It just don't work for me, but used to work before I "downgrade" to Ubuntu 14.04
Also may work:
File > Connect to server
Ctrl-L Open a location bar where you can write directly.

If you didn't setup a password in your router, then go backwards:

telnet 192.168.1.1
scp username@ubuntuhost:/full path to your script.lua /tmp/
mv /tmp/*.lua /final destination folder/

(Last edited by Nilfred on 14 Apr 2014, 23:52)

Nilfred wrote:

Open Nautilus, last item on the left should be "Connect to server", type:

ssh://root@192.168.1.1/

or

sftp://root@192.168.1.1/

Please remember "sftp" requires installing an extra package.

davebdublin wrote:

Thank you for response. Can you advise steps pls.
I have putty ssh client open.

1. download pscp.exe from putty web page to the same folder where you have putty
2. pscp file.txt root@192.168.1.1:/tmp/

edit: I don't know this sure, but you may have problems with windows CRLF line endings in your script, openwrt needs only CR, so it is better to convert the file to linux format prior to transfer. I use pspad text editor for creating linux scripts, you can define code page and linux/windows/mac line endings and you can use it to convert your script too with one click, it is small, free editor with syntax highlighting, you will like it wink

(Last edited by nozombian on 15 Apr 2014, 07:12)

The discussion might have continued from here.