1

Say I'm on machine A and have SSH access to machines B and C. I'm logged in to machine B. I generate keys on B that I use to authenticate my access from B to C.

I've read that you should never generate keys on a remote system "over the internet". Why?

dbrane
  • 111
  • 2

2 Answers2

1

I believe what is discouraged generating a key for use on a local machine remotely. The situation you outlined is secure (assuming machine A and B are both trusted machines) if you're simply generating keys on machine B (and keeping them on machine B!) for use on machine B to connect to machine C.

Patrick Bell
  • 226
  • 1
  • 6
0

Never generate a private key on a machine that you don't want have access to the private key. If you're going to put the private key on that machine anyway, then you can generate it there.

However, in your case, do you really want the private key on machine B? If you only ever access C through B while you're accessing B through A, then consider using SSH's authentication forwarding so that you only have your private keys on machine A.

Macil
  • 1,472
  • 9
  • 11