You are Here:
FAQ
Scripting and Programming Languages
SSH (Secure Shell)
SSH Upgrades
Article #5
How do I configure authentication keys to work with SSH2 in OpenSSH?An SSH2 authorization file, typically found in ~/.ssh2/authorization, has a different format from its SSH1 ancestor. Instead of public keys, it contains keywords and values. Each line of the file contains one keyword followed by its value. The most commonly used keywords are Key and Command. Public keys are indicated using the Key keyword. Key is followed by white space, and then the name of a file containing a public key. Relative filenames refer to files in ~/.ssh2. For example: # SSH2 only Key myself.pub This means that an SSH-2 public key is contained in ~/.ssh2/myself.pub. Your authorization file must contain at least one Key line for public-key authentication to occur. Each Key line may optionally be followed immediately by a Command keyword and its value. Command specifies a forced command. A forced command begins with the keyword Command, followed by white space and ends with a shell command line. For example: # SSH2 only Key somekey.pub Command "/bin/echo All logins are disabled" Note that a Command line by itself is an error. The following examples are illegal: # THIS IS ILLEGAL: no Key line Command "/bin/echo This line is bad." # THIS IS ILLEGAL: no Key line precedes the second Command Key somekey.pub Command "/bin/echo All logins are disabled" Command "/bin/echo This line is bad." |
© 2008 1&1 Internet Inc - About 1&1 Internet