Find the answer to your Linux question:
Results 1 to 7 of 7
i can not move file from a sever to another one via SSH for examaple source server : vbulletin.com user : hala pass : 123 source path : /home/hala/public_html/bakcup/db.sql destination ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2007
    Posts
    27

    scp commad error


    i can not move file from a sever to another one via SSH

    for examaple


    source server : vbulletin.com
    user : hala
    pass : 123
    source path : /home/hala/public_html/bakcup/db.sql


    destination server :linuxforum.com
    user : zode
    pass : 321
    destination path : /home/zode/dbs

    how can i move it ?

  2. #2
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Code:
    ssh hala@vbulletin.com
    <password>
    scp /home/hala/public_html/bakcup/db.sql zode@linuxforum.com:/home/zode/dbs/
    <other_password>
    This won't work if you want to include it as part of a script though....
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  3. #3
    Just Joined! stukov's Avatar
    Join Date
    Feb 2007
    Posts
    44
    Try : $ scp user@host:/file user2@host2:/file2

    About the passwords, check $ man scp in order to see if there is a parameter to specify the password. I'm on FreeBSD right now and won't be able to check on a linux box until tomorrow

    Hope this helps.

  4. #4
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    The password problem is easy enough to overcome with public keys.

    Check out this link.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  5. #5
    Just Joined! stukov's Avatar
    Join Date
    Feb 2007
    Posts
    44
    smolloy's solution is pretty interesting. In FreeBSD, you can use scp's -i option to specify your ssh key, there should be something similar to linux (man scp for more details).

  6. #6
    Just Joined!
    Join Date
    Jan 2007
    Posts
    27
    is it requred to have SSH in both server to be able to run scp command ?

  7. #7
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    You need a properly configured ssh daemon running in the computer you want to connect to, and you need ssh to be installed in the computer you want to connect from (although I've never seen an installation where the latter hasn't been the case).
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

Posting Permissions

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