This discussion is archived
1 Reply Latest reply: Dec 26, 2012 11:51 PM by Dude! RSS

Establish connection using SFTP-SSH File Transfer Protocol

919765 Newbie
Currently Being Moderated

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
    Dude! Guru
    Currently Being Moderated
    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/`
    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.


  • Correct Answers - 10 points
  • Helpful Answers - 5 points