How to create and enable SSH Keys

SSH Keys Overview


Create the RSA Key Pair


On OSX and Linux



  1. Open a terminal
  2. Generate a new Key typing the following command ssh-keygen -o


    The -o option was added in 2014; if this command fails for you, simply remove the -o option

    1. Give a name to your Key Enter file in which to save the key (/Users/me/.ssh/id_rsa): otherwise, the default name will be id_rsa
    2. Set a passphrase Enter passphrase (empty for no passphrase): this step is not mandatory but highly recommended
    3. You should now have two files for your Key (a public key that we will copy on your instances, and a private key that you must keep secret), in our example the two files are located in the /Users/me/.ssh/ directory


    The public Key is named id_rsa.pub The private Key is named id_rsa

    The entire key generation looks like this

    ssh-keygen -o
    
    Generating public/private rsa key pair.
    Enter file in which to save the key (/Users/me/.ssh/id_rsa):
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /Users/me/.ssh/id_rsa.
    Your public key has been saved in /Users/me/.ssh/id_rsa.pub.
    The key fingerprint is:
    12:93:cc:c1:5b:76:4f:b6:b9:b4:65:b0:33:8b:f1:59 me@localhost
    ...


    Copy your public key content which is required for step 2

    cat /Users/me/.ssh/id_rsa.pub
    
    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3TsFepMvwNBIjsr3Zr85mj/Aho/tk3220ryzVxgxR44EWz9xe8YhUt0Tg08e4pHns8DV6UnGwDeGLtxNwSFZlh1Zox3jACHL2dId04NAjLno1MsddByudPB7UpRu+nUjN7b8/rIAjXNu4k7H+E1QEz8P7giPiql2YMxURO9TV0tbl4M9hNG0/S6ka/naF8pIUnz7Um1nHGiBsMh9IyJAMhdWJ1nN3p1dnG3ixvyf1Mb8+7sbHjRgdUA3L8/HTBOCp+twB9uG+GfFEdheyHcnbxdtkByLzx2GbEnLNZZ99pF9i/cdpcaWCpnnqf/6TNVpFyCWhSfBq8+4OKUHt5vDB

    Reboot scaleway server.

    On Filezilla


    1. Open Filezilla
    2. Open Site Manager 
    3. Site Manager:
      1. Protocol : SFTP
      2. Host : Scaleway IP Address
      3. Logon Type : Key File
      4. User : root
      5. Key File : /Users/me/.ssh/id_rsa (not .pub)
      6. Is .ssh folder is hide shift+command+dot key press is visible.
      7. Filezilla Warning "Convert key file" window, click Yes button
      8. The file '/Users/me/.ssh/id_rsa' is not in a format supported by FileZilla. Would you like to convert it into a supported format?
      9. Click Yes button. After save as file name.
      10. Finish "Site Manager" Connect button.






    (2)



    (7)(8)


    Then see the files on the server.