Run SSH2 on Redhat 6.2

xiaoxiao2021-03-06  87

This document describes how to install on Linux and use SSH2.

-------------------------------------------------- ------------------------------

First, copyright description

This document will follow the GPL release

Second, the software gets

1 redhat 6.2

Http://freesoft.online.sh.cn/

2 SSH2 Server

RPM: SSH-Commercial-Server-2.2.0-2nox.i386.rpm Source: SSH-2.2.0.Tar.gz

http://www.ssh.com

3 SSH2 Client RPM: SSH-Commercial-Workstation-2.2.0-2.i386.rpm http://www.ssh.com

Third, software installation

Description: Remote Host Name: Remote (Server) 192.168.1.222 Local Host Name: Local (Client) 192.168.1.223

1 Install RedHat6.2

2 Install SSH2 Server (Remote Host)

Use rpm [root @ remote root] # rpm -ivh ssh-commercial-server-2.2.0-2nox.i386.rpm

Use Source

[root @ transote root] # tar xzvf ssh-2.2.0.tar.gz # cd ssh-2.2.0 # ./configure # make # make install

3 Install SSH2 Clinet (Local Host)

[root @ local root] # rpm -ivh ssh-commercial-workstation-2.2.0-2.i386.rpm

Fourth, system configuration 1. Start SSHD [root @ remote root] / usr / loca / sbin / sshd2 in Remote Host

2 Add user account like Bill [root @ local root] useradd bill [root @ local root] Passwd Bill

3 Create a user's public and private key on the client to log in to Local Host [BILL @ local local] $ ssh-keygen generating 1024-bit dsa key pair 9 o @ k k 成 o... # 1024- Bit DSA, Created by Bill @ local WED SEP 23 07:11:02 1998 Passphrase: Enter some characters, no more than 20 Again: Repeat Enter a private key saved to /Home/bill/.ssh2/ID_DSA_1024_A

4 Create a user's authentication file on the Client Log in to local host [BILL @ local local] $ cd ~ / .ssh2 [bill @ local local] $ echo "idkey id_dsa_1024_a"> Identification

4. Add user account for remote logins such as Bill [root @ remote root] # UserAdd Bill [root @ remote root] # Passwd Bill

5. Log in to Remote Host [BILL @ remote local] $ ssh-keygen generating 1024-bit dsa key pair 9 o @ @ local wed SEP, Created by BILL @ local 23 07:11:02 1998 Passphrase: Enter some characters, no more than 20 Again: Repeat a private key saved to /home/bill/.ssh2/ID_DSA_1024_A6. Log in to local host [Bill @ local local] $ CD ~ [BILL @ local local] $ c ./.ssh2/id_dsa_1024_a.pub local.pub

$ Ftp local with Bill FTP Remote Host [BILL @ local bill]

FTP> LCD ~ / .ssh2 ftp> cd ~ / .ssh2 ftp> Put local.pub ftp> bye

Tel NELNET Remote Host [Bill @ local bill] $ telnet local [bill @ remote bill] $ cd ~ / .ssh2 [bill @ remote .ssh2] $ echo "key local.pub"> Authorization

Five tests in Local Host

[BILL @ local bill] $ ssh remote passphrase for key "/HOME/BILL/.SSH2/ID_DSA_1024_A" with comment "1024-bit d: Enter some characters entered in front Authentication Successful.

[Bill @ Remote bill] $ netstat -n Active Internet connections (w / o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 252 192.168.1.222:22 192.168.1.223:3532 ESTABLISHED Active UNIX domain sockets ( W / O Servers) Proto Refcnt Flags Type State I-Node Path Unix 9 [] DGRAM 436 / dev / log unix 0 [] stream connection 177 @ 0000000016 UNIX 0 [] DGRAM 771 Unix 0 [] DGRAM 753 Unix 0 [] DGRAM 672 UNIX 0 [] DGRAM 636 Unix 0 [] DGRAM 590 Unix 0 [] DGRAM 575 Unix 0 [] DGRAM 523 Unix 0 [] DGRAM 458 Unix 0 [] DGRAM 446

[BILL @ local bill] $ sftp remote passphrase for key "/HOME/BILL/.SSH2/ID_DSA_1024_A" with comment "1024-bit d: sftp> ls -l drwxr-xr-x 5 Bill Bill 4096 JUL 12 6:29 Desktop / -RWXR-XR-X 1 BILL BILL 333 JUL 12 6:29 .emacs * -rw-r - r - R - R - 1 Bill Bill 24 JUL 12 6:29 .bash_logout -rw-r - r - 1 Bill Bill 230 JUL 12 6:29 .bash_profile -rw-r - r - R - 1 Bill Bill 124 JUL 12 6:29 .bashrc drwxr-xr-x 3 Bill Bill 4096 JUL 12 6:29 .kde / -rw- R - r - 1 Bill Bill 435 JUL 12 6:29 .kderc -rw-r - r - 1 Bill Bill 3394 JUL 12 6:29 .screenrc -rw ------- 1 Bill Bill 316 JUL 12 16:31.bash_history drwxr-xr-x 3 Bill Bill 4096 JUL 12 16:00 .ssh2 / sftp> six end

转载请注明原文地址:https://www.9cbs.com/read-106193.html

New Post(0)