0

My advisor has opened ssh access for me to his machine. From my machine (mac OSX), I type

ssh username@hisMachineIP

and enter a password, I can connect to that machine.

But on my own machine, in the ~/.ssh directory, there is only one file known_hosts, but there is no id_rsa and id_rsa.pub files.

I remember that I didn't generate ssh key, so these 2 files are not there is not superising.

My question is that, if I didn't generate ssh key and give the public key to my advisor, how can I connect to his machine? I did see some message the first time I connected to his machine, but I didn't remember what it is?

If I now generate a ssh key, would it break my access to my advisor's machine? (i.e. Do I need to give the generating public key to my advisor?)

1

In an out-of-the-box OpenSSH server configuration you can log on with two options:

  1. Username and password authentication
  2. Username and key authentication

You are using the first type, which is enough for a default setup. It wouldn't be a problem to generate keys using ssh-keygen. The client will try to log on with your key, if that doesn't work it'll fall back to password authentication. If you give your generated public key to your advisor you are able to log in using your key, so you don't have to type your password anymore (and making your login much more secure).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.