# upload file?



## nooobie123 (Oct 8, 2009)

Is there any cli utility I can use to upload file to the internet?


----------



## Mormegil (Oct 8, 2009)

The short answer is yes.  A more helpful answer requires a much more detailed question.


----------



## nooobie123 (Oct 8, 2009)

Mormegil said:
			
		

> The short answer is yes.  A more helpful answer requires a much more detailed question.



Could you pls tell me what? I am trying to transfer config files from one pc to another via internet. Both are setup without X and one is intalled on vbox-ose(without usb support)...


----------



## noobster (Oct 8, 2009)

scp?


----------



## nooobie123 (Oct 8, 2009)

Also what site you could recommend to use and how. I can't picture out uploading files thru cli. With a browser, basically you just sign-in and and hit upload button and you're done. How does it work with cli?


----------



## Beastie (Oct 8, 2009)

nooobie123 said:
			
		

> Also what site you could recommend to use and how. I can't picture out uploading files thru cli. With a browser, basically you just sign-in and and hit upload button and you're done. How does it work with cli?


If it's just conf files, why don't you just do that? Use a text-based browser (e.g. www/w3m) and go to http://pastebin.com/.


----------



## richardpl (Oct 9, 2009)

nc(1), /usr/ports/ftp/curl, ...


----------



## dennylin93 (Oct 9, 2009)

Try scp() and sftp(). They're probably the fastest to set up.


----------



## CodeBlock (Oct 9, 2009)

Yeah just use `scp`. Chances are both machines already have ssh, and scp is very easy to use:

`scp <local file> username@remote.machine:/path/on/server/`

or to reverse it (grab a file from the remote server):

`scp username@remote.machine:/path/on/server/file.txt ./newfilename.txt`

Another plus is that since it uses ssh, scp is obviously secure 

Set up passwordless keys, and you don't even need to enter a password every time.


----------



## donald1000 (Oct 19, 2009)

... or rsync
rsync -v -c -r <localfile/directory> user@remotehost:/path/anywhere/


----------



## vivek (Oct 19, 2009)

FreeBSD offers cli client for all protocols

FTP (File Transfer Protocol - ftp or lftp or ncftp, ncftpput, ncftpget
ssh (recommend for file transfer) - scp, ssh, sftp
SMB / CIFS - mount_smbfs, smbget, smbclient etc from Samba project.


----------

