Ask the wiseguys

Here you can ask your questions on topics of this site, witch you don't find information for. Please use the form at the bottom of this page to contact us. We'll try to answer every question. Answers will be published on this page.

Mahesh Acharya - 2008-12-17 12:00:06 - i was trying to connect to remote linux server from my window machine. I used putty and wanted to use public-private key pair. It's written that the public key is single-line. But the key that putty generates has multtiple line. It also has comments. Should i add all these multiple lines in the remote authorizedkeys or select only one line and append . thnx
You probably refer to saved to file public key, for example:

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "key-comment"
AAAAB3NzaC1yc2EAAAABJQAAAIEAoE1v9B7BWPeL88glRzCqgsBsqn/dMeY/C6b+
uFRQps/y3tKQgQ7Ajaaaaaaaaaa2JlWkEx1kVfhdy7srUMDPnpdUByaY+1079p96
ftYbxHhipWO0OWb3DV64keMQQ0IttFd2cjDv7uQFlRGyb7FTyeqykWTqMIiZDQ5W
1vPJkx8=
---- END SSH2 PUBLIC KEY ----


Well the key format of  authorized_keys consists of 3 parts, for example:

ssh-rsa some-very-long-string key-comment

You must add those 3 values on a single line in authorized_keys file, no matter if you got them on separate lines. So just concatenate all lines containing letters and digits to form some-very-long-string part and add the comment to the end. You'll et something like:

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAoE1v9B7BWPeL88glRzCqgsBsqn/dMeY/C6b+uFRQps/y3tKQgQ7Ajaaaaaaaaaa2JlWkEx1kVfhdy7srUMDPnpdUByaY+1079p96ftYbxHhipWO0OWb3DV64keMQQ0IttFd2cjDv7uQFlRGyb7FTyeqykWTqMIiZDQ5W1vPJkx8= key-comment


vhyesjcism - 2007-06-28 19:19:35 - Hello! Good Site! Thanks you! oteptkasfoq



Your name
Email address for contact
Question