 nu2thisNOTPremium join:2005-04-07 Hallandale, FL Reviews:
·Comcast
| wget command in terminal to download files via ssh? Frustrated!
I have been trying to learn the command line. I am able to ssh (local network only) into other computers in terminal (still messing with router settings... ask later)
I am able to navigate to the file that I want. but I have been trying to download it... after googling, it seems the best way to download files using Terminal is wget. I installed it with Brew. But now I am stuck on how to download a file with wget (or does it only download files with url's?) -- Why are you so surprised to see sinners in church? Are you shocked to see sick people in a hospital too? |
|
 nu2thisNOTPremium join:2005-04-07 Hallandale, FL Reviews:
·Comcast
| what is my end goal? I want to be able to be home, and download files from the computer in my office AND i think it would be cool if I were able to do it via Terminal. lol -- Why are you so surprised to see sinners in church? Are you shocked to see sick people in a hospital too? |
|
 pflogBueller? Bueller?Premium,MVM join:2001-09-01 El Dorado Hills, CA kudos:3 | wget is for http or ftp URLs, yes.
What you probably want to use is scp if the systems in question have ssh/sshd installed.
Then you could, from host #1:
scp host2:/path/to/file local/path/to/copied/file
If ssh/sshd is not an option, you may need to use NFS or Samba (windows file sharing) to accomplish it. -- "I drank what?" -Socrates |
|
 bobrkYou kids get offa my lawnPremium join:2000-02-02 San Jose, CA | reply to nu2this wget works great. You will probably have to read the man page to get the most out of it, though.
man wget |
|
 JohnInSJPremium join:2003-09-22 San Jose, CA | reply to nu2this you're looking for scp, not wget. |
|
 | reply to nu2this As mentioned, you're looking for scp. The syntax is scp user@host:/path/to/file /destination/file. |
|
 nu2thisNOTPremium join:2005-04-07 Hallandale, FL | reply to pflog i tried scp but I may have done it wrong |
|
 nu2thisNOTPremium join:2005-04-07 Hallandale, FL | reply to squircle ahhhh... you just showed me what i missed... the colon between lemme try... thanks! |
|
 nu2thisNOTPremium join:2005-04-07 Hallandale, FL Reviews:
·Comcast
| reply to squircle
admin:Desktop admin$ scp admin@192.168.1.145:/Users/admin/Desktop/ENIGMA.jpg usage: scp [-12346BCEpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2
-- Why are you so surprised to see sinners in church? Are you shocked to see sick people in a hospital too? |
|
 dennismurphyPut me on hold? I'll put YOU on holdPremium join:2002-11-19 Parsippany, NJ Reviews:
·Verizon FiOS
·Optimum Online
| said by nu2this:admin:Desktop admin$ scp admin@192.168.1.145:/Users/admin/Desktop/ENIGMA.jpg usage: scp [-12346BCEpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2
Need a destination.
scp username@destination:/Path/To/File/On/Remote/Site/filename /Path/To/Destination/filename
for example:
scp fred@flintstone.org:/tmp/barneys-cell-phone-num.txt .
(the . is the current working directory, so it'll copy the file from flintstone.org to the current directory. |
|
|
|
 nu2thisNOTPremium join:2005-04-07 Hallandale, FL | YOU ARE AWESOME! thanks! so freaking cool!
thank you so much! |
|
 nu2thisNOTPremium join:2005-04-07 Hallandale, FL | now on to the next issue... to do this outside of the network (from my home to the office) |
|
 pflogBueller? Bueller?Premium,MVM join:2001-09-01 El Dorado Hills, CA kudos:3 | said by nu2this:now on to the next issue... to do this outside of the network (from my home to the office) You will need to port forward port 22 on your router to the internal IP address of the machine you want to copy to/from. Then assuming your company doesn't have a firewall, you can do the same thing with scp.
If there's a firewall in place, depending on what OS at work you have, you can use putty or there are various proxy navigators you can plug into OpenSSH's .ssh/config file.
We need more info about your work setup and whether there's a firewall there preventing outbound connections to port 22. -- "I drank what?" -Socrates |
|
 nu2thisNOTPremium join:2005-04-07 Hallandale, FL Reviews:
·Comcast
| I have a firewall... |
|
 pflogBueller? Bueller?Premium,MVM join:2001-09-01 El Dorado Hills, CA kudos:3 | I believe the port forwarding for that router would be under "Applications & Gaming", but not 100% sure.
The firewall I was asking about was at your work. Does your work restrict connections only to port 80/443 (for web browsing) or is there a proxy configured in your browser at work in order to connect to web sites? Or do you connect directly with no proxy? -- "I drank what?" -Socrates |
|
 nu2thisNOTPremium join:2005-04-07 Hallandale, FL Reviews:
·Comcast
| reply to pflog on the cisco LInksys E2500 / Applications and Gaming tab... i went to single port forwarding
External Port 22 Internal Port 22 Protocol BOTH (tcp udp) to IP Address (can't be left blank) it's all 192.168.1. (fill in last 3) only option
and then check the box to Enable
but I don't think this works from outside of the network. -- Why are you so surprised to see sinners in church? Are you shocked to see sick people in a hospital too? |
|
 nu2thisNOTPremium join:2005-04-07 Hallandale, FL Reviews:
·Comcast
| reply to pflog it's my office. I don't have an IT guy... lol (me i guess) I haven't setup any firewalls (other then what is coming from the router as default and/or ISP COMCAST XFINITY as default. nothing extra.
I am running 10.8.2 on all my macs (office and home) -- Why are you so surprised to see sinners in church? Are you shocked to see sick people in a hospital too? |
|
 pflogBueller? Bueller?Premium,MVM join:2001-09-01 El Dorado Hills, CA kudos:3 | reply to nu2this Yes, it will if that's your only router. So now you should be able to, in theory:
ssh youruser@public_ip_on_router
If so, scp should work in the same manner. You won't be able to scp FROM home to work, but you can accomplish the same thing buy initiating the scp always from the work machine:
from work to home:
scp /path/to/local/file homeuser@home_public_ip:/path/to/file/at/home
and from home to work:
scp homeuser@home_public_ip:/path/to/file/to/copy /path/to/file/at/work
But this all depends whether your work blocks outbound port 22 or not...
-- "I drank what?" -Socrates |
|
 nu2thisNOTPremium join:2005-04-07 Hallandale, FL Reviews:
·Comcast
| how can i see if router port 22 is blocked? and can i try to connect to public ip from inside the office to test? or will it get errors? -- Why are you so surprised to see sinners in church? Are you shocked to see sick people in a hospital too? |
|
 pflogBueller? Bueller?Premium,MVM join:2001-09-01 El Dorado Hills, CA kudos:3 | said by nu2this:how can i see if router port 22 is blocked? and can i try to connect to public ip from inside the office to test? or will it get errors? Just get the external IP address of your home router (should show up via the web interface status). Then try to ssh from your work computer. You can add -vv to the command to see verbose output to see when it attempts to open the socket to connect. If it hangs, it's probably still being blocked/firewalled on your home connection. -- "I drank what?" -Socrates |
|