connecting to instance, managing keypairs