LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-14-2004, 04:12 PM   #1
Tekime
Member
 
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53

Rep: Reputation: 15
Question Getting a remote file using SSH


Hello,

This is probably in the wrong forum, but it seems like more of a networking question than anything.

I'm using SSH to access a sandbox on a client's server. They left a gz file in my userdir containing an SQL dump of a database I need to review.

They have around 27 IPs designated for dev servers and I can tunnel to these fine pointing say localhost:8080 to 192.168.1.x:80 where x is the dev server I want to see.

My account's on the primary server and I don't have a webdir set up. If I create a public_html folder I don't have the permissions to set it to unknown and I'm denied access via HTTP to localhost:8080/~username/.

SFTP and FTP are not running... so I'm kind of at a loss as to how I'm supposed to get this file. I don't have anybody to contact and I want to get some work done tonight so I thought I would ask some of the gurus if I'm missing something obvious here!

Any advice on how to grab that file would be great. Oh, and it is 100MB+ uncompressed so unfortunately I can't just copy/paste the SQL from my
terminal.

I am on Win XP using PuTTY, and it's actually a FreeBSD server IIRC.

Thanks very much in advance.

Last edited by Tekime; 11-14-2004 at 04:14 PM.
 
Old 11-14-2004, 05:07 PM   #2
slackwaregeek
LQ Newbie
 
Registered: Oct 2004
Distribution: Slackware 10.2
Posts: 20

Rep: Reputation: 0
sftp is included in sshd. if you can ssh into a machine, you should be able to sftp into it also.
 
Old 11-14-2004, 05:09 PM   #3
randyding
Member
 
Registered: May 2004
Posts: 552

Rep: Reputation: 31
I've used putty but don't remember if it has file receive, I think it does. Take a look in the menu and see if it has something like "receive Zmodem", "receive kermit", etc...
I'll give you two examples.

Assume here that your putty has "receive zmodem".
First while connected to the remote computer, type in the ssh terminal the command "sz yourfile.gz", then in putty activate "receive zmodem".

If the remote computer does not have sz, but does have kermit installed, then start kermit on the remote computer, type "fast" command and hit enter followed by the "send yourfile.gz". Then in putty start the "receive kermit".

If all else fails, you could uuencode the .gz file, cat it to stdout, and use putty to capture the console text to a file. Then after the cat is complete you can hand edit the capture file to remove the leading and trailing junk and uudecode the .gz file back out. I hope you don't have to do that, but it does work.
 
Old 11-14-2004, 05:51 PM   #4
sal_paradise42
Member
 
Registered: Jul 2003
Location: Utah
Distribution: Gentoo FreeBSD 5.4
Posts: 150

Rep: Reputation: 16
try ssh from a linux box

if you have a *nix box that has sshd enabled, after you ssh into that box you can do
'scp /home/username/fileyouneed.gz hostnameofyourbox:/whereyouwanttoputit'
it will prompt you for your ssh password and after that it should transfer to your sshd enabled box
 
Old 11-14-2004, 05:56 PM   #5
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Putty comes with an utility called pscp.exe, if you don't have it check out the Putty website.
you execute something like:

pscp user@server:/path/to/file .
 
Old 11-15-2004, 08:32 AM   #6
Tekime
Member
 
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53

Original Poster
Rep: Reputation: 15
Thank you all very much for your response.

slackwaregeek, you're right SFTP was running I was just being numb. I actually grabbed WinSCP and had the file in no time!

I snagged pscp as well and I'm going to figure that one out.

Thanks again.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't SSH to remote machine: Connection closed by remote host Avatar Linux - Networking 35 10-23-2017 12:21 AM
Cannot ssh from remote pc pk_fox Linux - Networking 2 09-24-2008 07:47 AM
scp/ssh tail(multiple file) remote copy tpreitano Linux - General 1 08-22-2005 02:17 PM
how to remote download file by putty SSH? treotan Linux - Newbie 5 08-02-2004 10:47 PM
Remote X over SSH ktambascio Linux - Software 1 05-27-2004 07:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration