Ensure You Have An SSH Client Installed

To use SSH, you need an SSH client on your local system. If you know you have a client installed, skip this section. Otherwise do the following:

  • Open a terminal on your local system.
  • Enter the following command to identify which version of SSH you have installed.
    If SSH is installed, you see something similar to the following:
    myhost:~ manthony$ ssh -v
    OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
    usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
               [-D [bind_address:]port] [-e escape_char] [-F configfile]
               [-I pkcs11] [-i identity_file]
               [-L [bind_address:]port:host:hostport]
               [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
               [-R [bind_address:]port:host:hostport] [-S ctl_path]
               [-W host:port] [-w local_tun[:remote_tun]]
               [user@]hostname [command]
            
    
  • If you have ssh installed, go to the next step.
    If you don't have ssh installed, install it now.
  • List the contents of your ~/.ssh directory.
    If you don't have an .ssh directory, don't worry, you'll create it the Step 3 section. If you have a .ssh directory or you may see something like this:
    myhost:~ manthony$ ls -a ~/.ssh
    known_hosts
            
    

    If you have defined a default identity, you'll see the two id_* files:

    myhost:~ manthony$ ls -a ~/.ssh
    .        ..        id_rsa        id_rsa.pub    known_hosts
            
    

    In this case, the default identity used RSA encryption (id_rsa.pub). If you want to use an existing default identity for your Bitbucket account, skip the next section and go to enable SSH compression for mercurial.