|
Public key authentication can be usefull for automating file transfers via ssh. This is without question far more secure than using FTP with passwords encoded in a script or in a .netrc file. The problem is that FTP sends the user/password login in clear text. This is easy to see using the snoop command or any other packet capturing utility. The solution is to create a pair of keys using ssh-keygen. When the keys are created you have an opportunity to supply a passphrase. If you just press enter when prompted for the passphrase the keys will be generated with no passphrase. This is generally not recommended however it does greatly simplify automatic file transfers via ssh and it is far more secure than FTP so in my opinion it is acceptable as long as file and directory permissions adequately protect the private key. Here are the steps to setup public key authentication on Solaris with OpenSSH:
Here are examples of the private/public keys: Public Key: ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAovvV2shiTB4SQZauPz1BkesDu8v/ SGBLrFebyH+iG+YgarQ1tMHjisDqfknNIBR//7mRRPUzFyjWYrhNaufjHa9q7oJ/ dXH5BXaNP547QrVOkrfw3NEqL/6g/pwQIKCFiDe9QqCuweLBaknzyss9QLLsBbmL Vz1GluGx8XlO4kU= vic@skylab Note - The public key will have no line breaks. Private Key: -----BEGIN RSA PRIVATE KEY----- MIICWgIBAAKBgQCi+9XayGJMHhJBlq4/PUGR6wO7y/9IYEusV5vIf6Ib5iBqtDW0 weOKwOp+Sc0gFH//uZFE9TMXKNZiuE1q5+Mdr2rugn91cfkFdo0/njtCtU6St/Dc 0Sov/qD+nBAgoIWIN71CoK7B4sFqSfPKyz1AsuwFuYtXPUaW4bHxeU7iRQIBIwKB gG/CoUWQuG61iNyElL2mWNkWLnIle9nboZq/u0en+iHCX18cfJk0fsWLmXsrStQr UHTXBIcOiW73bm+UUlfvdykz4ShJpXHWkg5ZuY1EOGVl+Gt9cYI61WviYYHsYJKl D59V39aKQBjTKLZpiuVvHiJriWER+dSCvA3Azn/JaV3rAkEA10tqcWl0YblD7RGc pVIWc8IwH74VryAsdFgZHUPYScYm0VHx8/lfrYwIn6C50VbrvBTRAJ++AHYMjF22 4mWHywJBAMHMfqWvZbdVbJv3tPVsQwzXcIFCk+GSxjV6srC/cntd7l6E4nhtPgFE rPsTLQ0vuBoEMdQJ7f4o9kbRwDvaXC8CQHTfzBGuRn4xX2Nv9fNYcpacncgWu1Bw jSk3I5OLOuY4Xjcd2x4LCA3BC/7iOPyc5l7JeMXTD19WBs/bGiMhLHUCQGk0f0QA IUZEUOb0Lwji/9PFaPW2bYkVKcVCm4SFL4TMl1fhvMUIGlh1vP1TjXwv2PguKa2e /Yn4+ri7AfSbHBkCQQDV1Gss+3IlVAVlA9LJVj3irkfrfRNVp0qXXAw7cwXk0cBY xIpXplPcB9BxnlkzDd986cPG/rTzU2Di4RNHhAkM -----END RSA PRIVATE KEY----- |
You are visitor number 1962