Find the answer to your Linux question:
Results 1 to 6 of 6
Hi there; This is my first post on this forum. After googling for the past hour, I have not found an answer for a question that ought to be pretty ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    3

    help with scp


    Hi there;

    This is my first post on this forum. After googling for the past hour, I have not found an answer for a question that ought to be pretty easy to answer. I am trying to set up a script that copies data from one root on one Linux box to root on another Linux box.

    I logged onto the source book, got root access and I did "ssh-keygen -t dsa" and I generated a key. I then copied that key to /root.ssh/authorized_keys on the destination box. No matter what I do, I keep getting prompted for a password when I try to use scp on the source box to copy a file to the destination box, using root as both source and destination account.

    How do I fix this so I am not prompted for a password?

  2. #2
    Linux Engineer b2bwild's Avatar
    Join Date
    Jul 2008
    Location
    Behind You!
    Posts
    1,108
    Try this command on server
    # ssh-keygen -t dsa
    # ssh-copy-id -i ~/.ssh/id_dsa.pub user@server
    Never make any misteaks.

    Read my Blog at --> Penguin Inside Subscribe Feed

  3. #3
    Just Joined!
    Join Date
    Apr 2009
    Posts
    3
    Quote Originally Posted by b2bwild View Post
    Try this command on server
    The command ssh-copy-id doesn't exist on my server. What is that command supposed to do that I can't do by using sftp to put the public key on the destination server?

  4. #4
    Linux Engineer b2bwild's Avatar
    Join Date
    Jul 2008
    Location
    Behind You!
    Posts
    1,108
    openssh-client package contains the command ssh-copy-id. however its installed by default on most of the systems.

    Quote Originally Posted by srhorwitz View Post
    What is that command supposed to do that I can't do by using sftp to put the public key on the destination server?
    you mean scp?
    Never make any misteaks.

    Read my Blog at --> Penguin Inside Subscribe Feed

  5. #5
    Just Joined!
    Join Date
    Apr 2009
    Posts
    3
    Quote Originally Posted by b2bwild View Post
    openssh-client package contains the command ssh-copy-id. however its installed by default on most of the systems.



    you mean scp?
    Yes, how do I scp a file from root on one Linux box to another without being prompted for a password? You mentioned

    " ssh-copy-id -i ~/.ssh/id_dsa.pub user@server"

    but the ssh-copy-id" command isn't found on my server.

  6. #6
    Linux Engineer b2bwild's Avatar
    Join Date
    Jul 2008
    Location
    Behind You!
    Posts
    1,108
    OK i found a guide, and its working
    Take a look at Here
    Never make any misteaks.

    Read my Blog at --> Penguin Inside Subscribe Feed

Posting Permissions

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