LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   PCLOS 2007 & FC9: can't copy files from FC9 box to home PCLOS 2k7 via ssh (https://www.linuxquestions.org/questions/linux-newbie-8/pclos-2007-and-fc9-cant-copy-files-from-fc9-box-to-home-pclos-2k7-via-ssh-731351/)

aaliyah 06-08-2009 01:13 AM

PCLOS 2007 & FC9: can't copy files from FC9 box to home PCLOS 2k7 via ssh
 
Hello everyone. This is my first post. I am using pclos 2k7 from home. I have files at work on a fc9 box. I am trying to connect to my company's ssh environment from home.

$ ssh name@domain.com <<-- seems to work just fine.


From there I have to ssh user@fc9 to get access to my fc9 box at work.

I tried to copy files from my box directly to my pclos 2k7 box at home, but it looked like I copied it to the shell environment instead. I used the following command :


scp -r user@pcshell:/home/user/folder1 .

I guess the 'ssh environment' is a box that allows the tunnel connection for ssh sessions. So anyways, when I do a 'ls', I see that I have copied the 'folder1' in my home directory of the 'ssh environment' box. But I would like this folder and it's contents to be copied to my home pclos box.


I tried then using this command:

scp -r user@pcshell.domain.com:~/folder1/ redla@192.168.2.104:~/folder1/

It asks for the user's password. I provide it but then it just hangs.


I have a DSL connection going into a linksys router providing dhcp leased ip addresses. My pclos is on a laptop with a wireless connection.

Any ideas would be appreciated.

schneidz 06-08-2009 08:39 AM

^ gotta' say this is kinda' confusing.

if you have ssh access to the server you should be good to go (i recommend using keys to log in).
your scp syntax looks good but this is what it should be in general:
Code:

scp user@remote.com:path/to/file .
mite i suggest sshfs. it makes an nfs-like file browser over an ssh connection seamlessly.

edit: i just read it again... seems like your company's lan is setup such that you have to copy files from the fc-9 machine to the ssh connection domain machine and then from your laptop to the ssh connection domain .

aaliyah 06-17-2009 08:31 AM

Hi Schneidz. Yes you are correct. And I agree with you... it is confusing. I also agree with the syntax you suggested. The problem is that
I would like to copy the files from the ssh connection domain machine to my laptop at home. Would you know how to proceed?

schneidz 06-17-2009 01:12 PM

^ not really, it seems like your corporation is doing something kinda' non-standard.

if you cant ssh directly to your work machine (without going thru your company's firewall) then maybe you can use sshfs (or nfs) to mount your work machine's home directory to it wherever you need to log in first then you can scp from home to that mount-point. (else ssh tunneling mite bring you joy but i never had a need to use it.)

Quote:

Originally Posted by aaliyah (Post 3566491)
I have a DSL connection going into a linksys router providing dhcp leased ip addresses. My pclos is on a laptop with a wireless connection.

in the router config make sure that the ssh (port 22) traffic is being forwarded to the pclos machine (may need to do static-ip).

to troubleshoot make sure you can ssh back and forth (home <-> intermediate and intermediate <-> work-machine).
then scp should work like this from the middle-man: scp user1@work:file user2@home:file


All times are GMT -5. The time now is 06:35 PM.