1 Reply Latest reply on Dec 27, 2012 7:51 AM by Dude!

    Establish connection using SFTP-SSH File Transfer Protocol


      Iam new for linux. I have username and FTP server host name and RSA privatekey, by using with these details I would like to connect FTP server with RSA private key. Can anyone send me the commands to connect FTP server .

      Edited by: 916762 on Dec 26, 2012 11:13 AM
        • 1. Re: Establish connection using SFTP-SSH File Transfer Protocol
          As far as I'm aware, that's not how it works.

          You generate a private and public key on your local host and copy your public key to the remote system to be able to login with any SSH protocol without specifying a password:

          1. Create a public and private key.
          2. Send your .pub key to the remote system admin, or install it yourself if you have the login with password.

          The below is a cut and paste from one of my previous replies regarding this topic.
          On the server side:
          Edit /etc/ssh/sshd_config and remove the # from the following:
          RSAAuthentication yes
          PubkeyAuthentication yes
          AuthorizedKeysFile .ssh/authorized_keys
          Then restart the ssh server:
          /etc/init.d/sshd restart
          Login as the user for whom this is for:
          su - <username>
          mkdir .ssh
          chmod 700 .ssh
          On the client side:
          Run the following command:
          ssh-keygen -t rsa (omit password)
          Then use the following to copy the public key from the client to the
          corresponding login .ssh directory on the server side;
          KEY=`cat ~/.ssh/id_rsa.pub`
          ssh username@remote_server "echo "$KEY" >> .ssh/authorized_keys"
          ssh username@remote_server "chmod 644 .ssh/authorized_keys"
          Earlier versions of openSSH may not work with RSA due to patent restrictions that existed in the past. It is usually better to use DSA instead of RSA if the remote system is Linux. DSA is more compatible with other open source products, like cURL, etc.