configure ssh service in linux :

itpremier發表於2010-06-21

1, make sure the sshd service is installed on system.
service sshd status

2, create public/private key pairs:
ssh-keygen # answer with default value.
3, now private and public key pairs are created as OpenSSH format.

if we use other client tool not ssh program (such as secureCRT,PUTTY)
We must first have a clear concept about the public key format.
In fact, Linux use OpenSSH format ,however Others (windows remote client tools)
use SECSH file format. So if we want use other tool connect to Linux SSHD server,
we should convert public key file from OpenSSH format to SECSH format.
Do it like this:
ssh-keygen -e -f id_rsa > id_rsa1.pub # or like following get the same result.
ssh-keygen -e -f id_rsa.pub > id_rsa1.pub

4, transfer to client . we can use sz/rz tool achieve this.Here we assume you have connected to server by Telnet client tool(secureCRT).
sz id_rsa1.pub

5, add the authorized public key:
cat id_rsa.pub >> authorized_keys

6, configure client tool select ssh2 tool, prioritize "public key" as the first authenticate method.
select the file received from sz( id_rsa1.pub) .

7, try to connect to server. Good Luck !

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/350519/viewspace-1034524/,如需轉載,請註明出處,否則將追究法律責任。

相關文章