When you try to connect to bar, you will advertise that you've got a certificate that you can use for the connection.īar will inspect various locations in the system, including ~/.ssh/known_hosts. But in our case, with a fair bit of simplification, these are used this way: You can do a lot of things related to security and authentication with them. e) What did I do exactly with these keys/certificates?įirst you generated a couple of files: a private key and a public certificate. This is safe for you even if bar is compromised. Only an SSH client (the scp/ sftp/ ssh programs). With this way of doing this, you don't even need a running SSH server on your computer. You can also autocomplete local and remote paths using the key. Now you can scp/ sftp/ ssh to bar as much as you want without having to provide a password. Note that a redirection with > would mean "replace the content of the file with this stream" while > means "append the stream at the end of the existing file"). But instead of printing it to the screen, you redirect this output to a file. (here, you displayed the content of pub_cert with cat. All you have to do is scp the file back to you directly: scp ~ If you are doing like this, you are doing it insecurely and wrong. In order to do just that, you first ssh to bar then scp file to foo: *bar* -ssh-> *foo* From what I've understood, you just want to copy a file from bar to foo: *bar* -copy-> *foo*
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |