Results 1 to 3 of 3

Thread: Difficulty using SCP in SSH

  1. #1
    Join Date
    Feb 2009
    Beans
    66
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Difficulty using SCP in SSH

    Hi, my goal is to send test.tgz which is located on John's computer under /home/john/iphone
    over to
    John's iphone under the directory
    /var/root/Media

    John's Ubuntu machine is the local machine.
    John's iphone is the remote machine.
    John's iphone IP is 192.168.1.64

    I have no problem sending file from Windows machine to the iphone using WinSCP. But when I try to achieve the same using Ubuntu commandline using SSH and SCP, I get the final error message of: No such file or directory.

    I went through the lines half a dozen times and cannot see any mistakes. Please tell me why the file is not going through thanks.



    john@Ubuntu-EeePC:~/iphone$ ls
    gcc-4.0.1-iphone-1.tgz test.tgz

    john@Ubuntu-EeePC:~/iphone$ hostname
    Ubuntu-EeePC

    john@Ubuntu-EeePC:~/iphone$ pwd
    /home/john/iphone

    john@Ubuntu-EeePC:~/iphone$ ssh root@192.168.1.64
    root@192.168.1.64's password:
    johns-iPhone:~ root# ls
    Library/ Media/

    johns-iPhone:~ root# pwd
    /var/root

    johns-iPhone:~ root# cd Media
    johns-iPhone:~/Media root# pwd
    /var/root/Media

    johns-iPhone:~/Media root# scp /home/john/iphone/test.tgz root@192.168.1.64:/var/root/Media/test.t…
    root@192.168.1.64's password:
    /home/john/iphone/test.tgz: No such file or directory
    johns-iPhone:~/Media root#



    Thanks.

  2. #2
    Join Date
    Jul 2009
    Location
    Sheffield, England
    Beans
    73
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Difficulty using SCP in SSH

    You're running the command from the iphone shell. Shouldn't you be running it from John's shell? Don't ssh into the iphone first. At the moment it looks like you're telling scp to copy the file from the iphone to the iphone.

    john@Ubuntu-EeePC:~$ scp /home/john/iphone/test.tgz root@192.168.1.64:/var/root/Media/test.t…

    I think.
    Last edited by MrWestwood; January 1st, 2011 at 03:26 PM.

  3. #3
    Join Date
    Nov 2010
    Location
    Mi
    Beans
    18
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Difficulty using SCP in SSH

    Agreed with MrWestwood

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •