Category: SSH

  • SSH login using key flag

    ssh -p 22 -i ~/.ssh/<name_of_key> <username>@<host>
    
  • “SSH Too Many Authentication Failures” Error

    To fix this error, you need to add the IdentitiesOnly with a value of yes, which instructs ssh to only use the authentication identity files specified on the command line or the configured in the ssh_config file(s), even if ssh-agent offers additional identities.

    For example:

    $ ssh -o IdentitiesOnly=yes vps2

    More info in this article

    On a side note, if FileZilla shoots an error at connecting, run the following command from the terminal:

    $ SSH_AUTH_SOCK=null filezilla &
  • SSH-ADD on Windows

    If you receive the following error when running the ssh-add command: Could not open a connection to your authentication agent, try this:

    cd path-to-Git/bin (for me : cd C:\Program Files\Git\bin)
    bash
    exec ssh-agent bash
    ssh-add REPLACE_WITH_SSHKEY
  • SSH to Siteground on Windows

    Step 1: Creating the key

    Create your SSH key in the Siteground panel. Give it a password and set a name for it. You can use the tutorial here: https://www.siteground.com/kb/access-site-ssh-connection/

    You will need the ssh-add command which comes with the OpenSSH Authentication Agent Properties. To enable the agent, you need to open up the Services app (click on start and type Services for Windows 10+) then scroll through the list and make sure the OpenSSH Authentication Agent Properties is enabled.

    After enabling it, you will be able to use ssh-add.

    More information here: https://stackoverflow.com/questions/18683092/how-to-run-ssh-add-on-windows

    Step 2: Connecting

    To connect you will still need to have the OpenSSH Authentication Agent Properties enabled. After that, you can use the following syntax to connect:

    ssh user@host -p port number / ssh test@host.com -p 1234

    Usually, if everything is correct you are not prompted for a password, but if you are, you will need to provide the password that you added to the key when creating it.

    Needless to say, the connection needs to be done through CMD or Windows PowerShell