RedHat上SSH2的安裝和使用(轉)
RedHat上SSH2的安裝和使用(轉)[@more@]本檔案說明如何在 Linux 上安裝、使用 SSH2.
一、版權說明
本檔案將遵循GPL釋出
二、軟體取得
1 RedHat 6.2
2 SSH2 Server
rpm : ssh-commercial-server-2.2.0-2nox.i386.rpm
source: ssh-2.2.0.tar.gz
3 SSH2 Client
rpm : ssh-commercial-workstation-2.2.0-2.i386.rpm
三、軟體安裝
說明:Remote Host Name :Remote (Server) 192.168.1.222
Local Host Name :Local (Client) 192.168.1.223
1 安裝 Redhat6.2
2 安裝 SSH2 Server(Remote Host)
使用 RPM
[root@Remote root]# rpm -ivh ssh-commercial-server-2.2.0-2nox.i386.rpm
使用 SOURCE
[root@Remote root]# tar xzvf ssh-2.2.0.tar.gz
# cd ssh-2.2.0
# ./configure
# make
# make install
3 安裝 SSH2 Clinet(Local Host)
[root@Local root]# rpm -ivh ssh-commercial-workstation-2.2.0-2.i386.rpm
四、系統配置
1.在 Remote Host 啟動sshd
[root@Remote root]/usr/loca/sbin/sshd2
2 在 Local Host 新增使用者賬號 如 bill
[root@Local root] useradd bill
[root@Local root] passwd bill
3 在Client 上建立使用者的公共和私人金鑰
以bill登陸到 Local Host 上
[bill@Local local]$ ssh-keygen
Generating 1024-bit dsa key pair
9 o.oOo..oOo.o
Key generated.
1024-bit dsa, created by bill@Local Wed Sep 23 07:11:02 1998
Passphrase :輸入一些字元,不超過20個
Again :重複輸入一遍
Private key saved to /home/bill/.ssh2/id_dsa_1024_a
4 在Client 上建立使用者的認證檔案
以bill登陸到 Local Host 上
[bill@Local local]$cd ~/.ssh2
[bill@Local local]$echo "IdKey id_dsa_1024_a" > identification
4. 在 Remote Host 新增用於遠端登陸的使用者賬號 如 bill
[root@Remote root]# useradd bill
[root@Remote root]# passwd bill
5. 以bill登陸到 Remote Host 上
[bill@Remote local]$ ssh-keygen
Generating 1024-bit dsa key pair
9 o.oOo..oOo.o
Key generated.
1024-bit dsa, created by bill@Local Wed Sep 23 07:11:02 1998
Passphrase :輸入一些字元,不超過20個
Again :重複輸入一遍
Private key saved to /home/bill/.ssh2/id_dsa_1024_a
6. 以bill登陸到 Local Host
[bill@Local local]$ cd ~
[bill@Local local]$ cp ./.ssh2/id_dsa_1024_a.pub Local.pub
以bill ftp Remote Host
[bill@local bill]$ ftp local
ftp> lcd ~/.ssh2
ftp> cd ~/.ssh2
ftp> put Local.pub
ftp> bye
以bill Telnet Remote Host
[bill@local bill]$ telnet local
[bill@remote bill]$ cd ~/.ssh2
[bill@remote .ssh2]$echo "Key Local.pub" > authorization
五 測試
在Local Host
[bill@local bill]$ ssh Remote
Passphrase for key "/home/bill/.ssh2/id_dsa_1024_a" with comment "1024-bit
d: 輸入前面輸入的一些字元
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 CONNECTED 177 @00000016
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-- 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-- 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>
六 結束
一、版權說明
本檔案將遵循GPL釋出
二、軟體取得
1 RedHat 6.2
2 SSH2 Server
rpm : ssh-commercial-server-2.2.0-2nox.i386.rpm
source: ssh-2.2.0.tar.gz
3 SSH2 Client
rpm : ssh-commercial-workstation-2.2.0-2.i386.rpm
三、軟體安裝
說明:Remote Host Name :Remote (Server) 192.168.1.222
Local Host Name :Local (Client) 192.168.1.223
1 安裝 Redhat6.2
2 安裝 SSH2 Server(Remote Host)
使用 RPM
[root@Remote root]# rpm -ivh ssh-commercial-server-2.2.0-2nox.i386.rpm
使用 SOURCE
[root@Remote root]# tar xzvf ssh-2.2.0.tar.gz
# cd ssh-2.2.0
# ./configure
# make
# make install
3 安裝 SSH2 Clinet(Local Host)
[root@Local root]# rpm -ivh ssh-commercial-workstation-2.2.0-2.i386.rpm
四、系統配置
1.在 Remote Host 啟動sshd
[root@Remote root]/usr/loca/sbin/sshd2
2 在 Local Host 新增使用者賬號 如 bill
[root@Local root] useradd bill
[root@Local root] passwd bill
3 在Client 上建立使用者的公共和私人金鑰
以bill登陸到 Local Host 上
[bill@Local local]$ ssh-keygen
Generating 1024-bit dsa key pair
9 o.oOo..oOo.o
Key generated.
1024-bit dsa, created by bill@Local Wed Sep 23 07:11:02 1998
Passphrase :輸入一些字元,不超過20個
Again :重複輸入一遍
Private key saved to /home/bill/.ssh2/id_dsa_1024_a
4 在Client 上建立使用者的認證檔案
以bill登陸到 Local Host 上
[bill@Local local]$cd ~/.ssh2
[bill@Local local]$echo "IdKey id_dsa_1024_a" > identification
4. 在 Remote Host 新增用於遠端登陸的使用者賬號 如 bill
[root@Remote root]# useradd bill
[root@Remote root]# passwd bill
5. 以bill登陸到 Remote Host 上
[bill@Remote local]$ ssh-keygen
Generating 1024-bit dsa key pair
9 o.oOo..oOo.o
Key generated.
1024-bit dsa, created by bill@Local Wed Sep 23 07:11:02 1998
Passphrase :輸入一些字元,不超過20個
Again :重複輸入一遍
Private key saved to /home/bill/.ssh2/id_dsa_1024_a
6. 以bill登陸到 Local Host
[bill@Local local]$ cd ~
[bill@Local local]$ cp ./.ssh2/id_dsa_1024_a.pub Local.pub
以bill ftp Remote Host
[bill@local bill]$ ftp local
ftp> lcd ~/.ssh2
ftp> cd ~/.ssh2
ftp> put Local.pub
ftp> bye
以bill Telnet Remote Host
[bill@local bill]$ telnet local
[bill@remote bill]$ cd ~/.ssh2
[bill@remote .ssh2]$echo "Key Local.pub" > authorization
五 測試
在Local Host
[bill@local bill]$ ssh Remote
Passphrase for key "/home/bill/.ssh2/id_dsa_1024_a" with comment "1024-bit
d: 輸入前面輸入的一些字元
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 CONNECTED 177 @00000016
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-- 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-- 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>
六 結束
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10617731/viewspace-947201/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RedHat Advance Server上安裝Oracle 9204 RAC參考手冊(轉)RedhatServerOracle
- 安裝 SSH2 擴充套件套件
- redhat安裝dockerRedhatDocker
- RedHat上靜默安裝Oracle11gRedhatOracle
- PHP安裝ssh2擴充套件PHP套件
- 在Linux(Redhat/CentOS)下安裝MySQL之yum(rpm)線上安裝方式LinuxRedhatCentOSMySql
- Linux(01):RedHat 7.6 安裝LinuxRedhat
- centOS(同redhat)安裝 dockerCentOSRedhatDocker
- git安裝及配置教程 windows windows上git的安裝和使用GitWindows
- RedHat FC5安裝xmmsRedhat
- PostgreSQL:Redhat 8.5 + PostgreSQL 14.5 安裝SQLRedhat
- CentOS7上安裝和使用DockerCentOSDocker
- Redhat 7 下安裝達夢7Redhat
- RedHat 7.6作業系統安裝Redhat作業系統
- 解決VMware安裝RedHat虛擬機器無法上網的問題Redhat虛擬機
- 在Centos8上安裝和使用curlCentOS
- azkaban的安裝和使用
- FTP的安裝和使用FTP
- GitLab 的安裝和使用Gitlab
- yarn的安裝和使用Yarn
- Go的安裝和使用Go
- CMake的安裝和使用
- tcping的安裝和使用TCP
- Python的安裝和使用Python
- redhat 5.4下安裝MYSQL全過程RedhatMySql
- ElasticSearch的安裝和使用,Postman的安裝,Kibana的安裝,EShead外掛的安裝ElasticsearchPostman
- Windows 上 nvm 的安裝與使用Windows
- Ubuntu 上 Wireshark 的安裝與使用Ubuntu
- Linux系統上怎麼安裝和使用 exa?Linux
- 如何在 Ubuntu 上安裝和使用 R 語言Ubuntu
- 在ubuntu上安裝docker, 使用國內的安裝源UbuntuDocker
- Linux上的redis的安裝和配置LinuxRedis
- redhat7.2靜默安裝Oracle11.2.0.4RedhatOracle
- redhat7.6安裝Oracle11G RACRedhatOracle
- VMware Workstation 的安裝和使用
- webpack的安裝和基本使用Web
- 在Linux(Redhat/CentOS)下安裝MySQL之yum(rpm)離線安裝方式LinuxRedhatCentOSMySql
- RedHat 7 靜默安裝Oracle11g的補充RedhatOracle
- 入門系列之在Ubuntu 16.04上安裝和使用TensorFlowUbuntu