Re: scp and forwarding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2005-11-22 at 19:14 -0400, Trevor "TeC" Christian wrote:
> Gregory P. Ennis wrote:
> 
> >On Mon, 2005-11-21 at 20:47 -0600, Gregory P. Ennis wrote:
> >  
> >
> >>List,
> >>
> >>It is easy to forward an ssh connection using the following command line
> >>syntax:
> >>
> >>ssh -t gateway.com ssh internal.com
> >>
> >>Is there a way to use scp to copy a file through a gateway machine to an
> >>internal server.
> >>
> >>Thanks,
> >>
> >>Greg Ennis
> >>
> >>    
> >>
> >        
> >I'm not sure i quite understand the reason for "through a gateway
> >machine"...
> >Is it that the internal server cannot get to the internal.com itself?
> >
> >Either way... i believe the fact that scp can be used to copy from one
> >remote location to another may be of some help.
> >scp user host:source user host:destination
> >
> >You get prompted for two passwords and your set...
> >
> >Hope this helps...
> >
> >--
> >*Trevor "TeC" Christian*
> >
> >Trevor,
> >
> >Thanks for the suggestion... I surely did not make myself clear in what I was trying to do.  I would like to copy a file from a remote machine through a gateway having the new file reside on an internal server.
> >  
> >
> OK... so you are connecting from the outside.
> 
> Is there a port forward or tunneling option available or possible?
> 
> >Your syntax worked beautifully to all remote copying of a file on the gateway to an internal server.
> >
> >To use your syntax here is what I would like to do, but have not been able to make it happen.
> >
> >scp /usr/local/bin/filename user@gateway user@internal:/usr/local/bin/filename
> >
> >The part that I obviously do not understand is the syntax for user@gateway.
> >
> >  
> >
> Hmmmmm.... I'm currently unsure of how you could get that to work.
> 
> One thing comes to mind, but i have nothing to test i on....  This 
> involved ssh-ing into the gateway and running the scp from there...
> 
> :$ ssh gateway 'scp me@remote:/usr/local/bin/filename 
> user@internal:/user/local/bin/filename'
> 
> As far as what you indicated you are trying to do, I'm keen on seeing 
> any other responses that may shed greater light on accomplishing this task.
> 
> >Greg
> >
> >  
> >
> 
> 

Trevor,

Good idea, but I could not make it work I received the error :

ssh: connect to address 10.0.0.147 port 22: No route to host

10.0.0.147 was the internal server.  I had logged on to the gateway
server and the syntax I used was :

scp root@remoteserver:/usr/local/bin/doc/ssh_syntax
root@internalserver:/usr/local/bin/doc/ssh_syntax

I'd like to hear from others as well.

Greg


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux