Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: How to transfer files from remote server

  1. #1

    Default How to transfer files from remote server

    when I log onto a server in my department from my computer at home:
    ssh -x name@domain
    then I want to get some files to my computer. I tried using
    scp from the remote end, or sftp from local pc. but
    scp *.ps /home/name/bio/. returns " cannot create regular file `home/name/bio/.': No such file or directory", the same result as cp.
    sftp name@domain:/usr1/name/bio08/N1/*.ps /home/name/bio/. returns "received message too long". there's an article talking about it, but still I've no idea how to fix it.

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: How to transfer files from remote server

    The sftp and scp are independent of any ssh session you may have going at the same time, so everything must be specified.

    Code:
    scp name@domain:/usr1/name/bio08/N1/'*.ps' /home/name/bio/.
    or

    Code:
    sftp name@domain
    cd /usr1/name/bio08/N1/
    lcd /home/name/bio
    get *.ps .

  3. #3
    ab@novell.com NNTP User

    Default Re: How to transfer files from remote server

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    The first example looks wrong.... you cannot copy over an SSH connection
    without specifying the host... if you leave off the host 'scp' literally
    works just like 'cp' in that it copies to the local box, which is
    exactly why you are seeing what you are seeing.

    The other example.... take the '.' off the end of .../bio/. to see if
    that helps. Otherwise swap 'scp' for your 'sftp' to see if that helps
    as I think it will. 'scp' is made to use like you are using 'sftp'.

    Good luck.





    paulga wrote:
    > when I log onto a server in my department from my computer at home:
    > ssh -x name@domain
    > then I want to get some files to my computer. I tried using
    > scp from the remote end, or sftp from local pc. but
    > scp *.ps /home/name/bio/. returns " cannot create regular file
    > `home/name/bio/.': No such file or directory", the same result as cp.
    > sftp name@domain:/usr1/name/bio08/N1/*.ps /home/name/bio/. returns
    > "received message too long". there's an article talking about it, but
    > still I've no idea how to fix it.
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIwGIi3s42bA80+9kRAhaEAJ9ej4d77AK8+CnsnwfJVA+S1pBeOACdEn0P
    izxzfydSemL+oKXM0MAAOqE=
    =F//g
    -----END PGP SIGNATURE-----

  4. #4

    Default Re: How to transfer files from remote server

    not work.
    Code:
    sftp name@domain
    returns "Received message too long 1920298606" in my case.
    there's an article suggesting this:
    SSH Frequently Asked Questions

    but I didn't find the solution

  5. #5
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: How to transfer files from remote server

    It means you have some output from a shell init file at the other end. The article explains far better than I could, do read it carefully.

    In order for this to work, the SSH session must be "clean" that is, it must have on it only information transmitted by the programs at either end. What often happens, though, is that there are statements in either the system or per-user shell startup files on the server (.bashrc, .profile, /etc/csh.cshrc, .login, etc.) which output text messages on login, intended to be read by humans (like fortune, echo "Hi there!", etc.). Such code should only produce output on interactive logins, when there is a tty attached to standard input. If it does not make this test, it will insert these text messages where they don't belong: in this case, polluting the protocol stream between scp2/sftp and sftp-server. The first four bytes of the text gets interpreted as a 32-bit packet length, which will usually be a wildly large number, provoking the error message above. Notice that:

    1416586337 decimal = 546F6461 hex = "Toda" ASCII

    suggesting a string beginning "Today..." (or maybe "Thank-you" in transliterated Hebrew).
    Following the suggestion of the article, your number 1920298606 is 72756E6E hex which are the characters "runn". You must have a echo "running ...." in some init file.

  6. #6
    ab@novell.com NNTP User

    Default Re: How to transfer files from remote server

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    No no.... forget sftp. 'scp' only.

    Good luck.





    paulga wrote:
    > not work.
    >
    > Code:
    > --------------------
    > sftp name@domain
    > --------------------
    >
    > returns "Received message too long 1920298606" in my case.
    > there's an article suggesting this:
    > 'SSH Frequently Asked Questions'
    > (http://www.snailbook.com/faq/sftp-corruption.auto.html)
    >
    > but I didn't find the solution
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIwHuE3s42bA80+9kRAiqHAJ0c42dc5wM6nF1k20z5sH3TqbzmigCcDNcK
    KtBJEXUhSxjYdFdS4B07Wzg=
    =XGf8
    -----END PGP SIGNATURE-----

  7. #7

    Default Re: How to transfer files from remote server

    Quote Originally Posted by ken_yap View Post
    It means you have some output from a shell init file at the other end. The article explains far better than I could, do read it carefully.



    Following the suggestion of the article, your number 1920298606 is 72756E6E hex which are the characters "runn". You must have a echo "running ...." in some init file.
    is this file in remote server or my own computer?
    but this is difficult to find.
    that article suggest using sshd to avoid the problem..but how?

  8. #8

    Default Re: How to transfer files from remote server

    it must be this echo:

    This is tokewanna.
    running cshrc

    this msg appears after I log in.

  9. #9
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: How to transfer files from remote server

    Yeah, get rid of it or use scp.

  10. #10

    Default Re: How to transfer files from remote server

    using scp name@domain:/bio08/N1/*.ps /home/.
    (or should it be "name@domain:bio08/N1/*.ps" ) ?
    returns 'running cshrc'
    and the transfer didn't happen
    so how to get rid of that echo?

Page 1 of 2 12 LastLast

Posting Permissions

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