merged ssh keys into one function