Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    share id_rsa.pub for SFTP


    I am using authorized_key instead of userId password to send files to my FTP server using sftp. The sftp server now has my id_rsa.pub in the authorized_key. I now have 10 more servers which want to send files to FTP files using sftp. I know that I can generate key pairs for each one and add the 10 id_rsa.pub to authorized_key file of the FTP server. But I need to ask the person who manage the FTP server to do the copy.
    This is just a test environment. Will just copy the keypair from my first server to each of the 10 new servers work ? The only thing I see in the id_rsa.pub that seems to be server specific is 'user@server'. But google search says that it is only a comment and will not be used.

  2. #2
    Just Joined!
    Join Date
    May 2011
    Location
    Austin, TX
    Posts
    93
    -->
    It sounds like you are trying to have 10 different machines all send data to the same destination server.

    You are using private/public keypairs to authenticate to the FTP server.

    Presuming that you did not use any custom options when creating your private/public keypair (e.g., ssh-keygen -O source-address=$IP-here) then technically-speaking yes you can copy your private key to the other servers and have only a single public key in the destination server's authorized_keys file.

    However, it is considered a poor practice by many to allow a private key to exist upon multiple places. It is highly suggested practice/behaviour to create new private/public keypairs for each job/machine and add them as-necessary.

    Your search results regarding the "user@" segment of a private-key are indeed correct. It is just a human-comment and can be used from any machine if you did not create it with other limitations.

Posting Permissions

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