切到 root
安装 <span style="font-family: Arial, Helvetica, sans-serif;">openssh-server</span>
启动 ssh服务
具体如下:
[chen@localhost ~]$ apt-get install openssh-server
bash: apt-get: command not found
[chen@localhost ~]$ yum install openssh-server
Loaded plugins: fastestmirror, refresh-packagekit, security
You need to be root to perform this command.
[chen@localhost ~]$ yum install openssh-server
Loaded plugins: fastestmirror, refresh-packagekit, security
You need to be root to perform this command.
[chen@localhost ~]$ su'
>
>
>
> ^C
[chen@localhost ~]$ su
密码:
[root@localhost chen]# yum install openssh-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.sina.cn
* extras: mirrors.sina.cn
* updates: mirrors.yun-idc.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package openssh-server.x86_64 0:5.3p1-84.1.el6 will be updated
---> Package openssh-server.x86_64 0:5.3p1-104.el6_6.1 will be an update
--> Processing Dependency: openssh = 5.3p1-104.el6_6.1 for package: openssh-server-5.3p1-104.el6_6.1.x86_64
--> Processing Dependency: libcrypto.so.10(libcrypto.so.10)(64bit) for package: openssh-server-5.3p1-104.el6_6.1.x86_64
--> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit) for package: openssh-server-5.3p1-104.el6_6.1.x86_64
--> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.1)(64bit) for package: openssh-server-5.3p1-104.el6_6.1.x86_64
--> Running transaction check
---> Package openssh.x86_64 0:5.3p1-84.1.el6 will be updated
--> Processing Dependency: openssh = 5.3p1-84.1.el6 for package: openssh-clients-5.3p1-84.1.el6.x86_64
--> Processing Dependency: openssh = 5.3p1-84.1.el6 for package: openssh-askpass-5.3p1-84.1.el6.x86_64
---> Package openssh.x86_64 0:5.3p1-104.el6_6.1 will be an update
---> Package openssl.x86_64 0:1.0.0-27.el6 will be updated
---> Package openssl.x86_64 0:1.0.1e-30.el6.8 will be an update
--> Running transaction check
---> Package openssh-askpass.x86_64 0:5.3p1-84.1.el6 will be updated
---> Package openssh-askpass.x86_64 0:5.3p1-104.el6_6.1 will be an update
---> Package openssh-clients.x86_64 0:5.3p1-84.1.el6 will be updated
---> Package openssh-clients.x86_64 0:5.3p1-104.el6_6.1 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
openssh-server x86_64 5.3p1-104.el6_6.1 updates 321 k
Updating for dependencies:
openssh x86_64 5.3p1-104.el6_6.1 updates 272 k
openssh-askpass x86_64 5.3p1-104.el6_6.1 updates 56 k
openssh-clients x86_64 5.3p1-104.el6_6.1 updates 437 k
openssl x86_64 1.0.1e-30.el6.8 updates 1.5 M
Transaction Summary
================================================================================
Upgrade 5 Package(s)
Total download size: 2.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): openssh-5.3p1-104.el6_6.1.x86_64.rpm | 272 kB 00:00
(2/5): openssh-askpass-5.3p1-104.el6_6.1.x86_64.rpm | 56 kB 00:00
(3/5): openssh-clients-5.3p1-104.el6_6.1.x86_64.rpm | 437 kB 00:00
(4/5): openssh-server-5.3p1-104.el6_6.1.x86_64.rpm | 321 kB 00:00
(5/5): openssl-1.0.1e-30.el6.8.x86_64.rpm | 1.5 MB 00:01
--------------------------------------------------------------------------------
Total 133 kB/s | 2.6 MB 00:19
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : openssl-1.0.1e-30.el6.8.x86_64 1/10
Updating : openssh-5.3p1-104.el6_6.1.x86_64 2/10
Updating : openssh-askpass-5.3p1-104.el6_6.1.x86_64 3/10
Updating : openssh-server-5.3p1-104.el6_6.1.x86_64 4/10
Updating : openssh-clients-5.3p1-104.el6_6.1.x86_64 5/10
Cleanup : openssh-clients-5.3p1-84.1.el6.x86_64 6/10
Cleanup : openssh-server-5.3p1-84.1.el6.x86_64 7/10
Cleanup : openssh-askpass-5.3p1-84.1.el6.x86_64 8/10
Cleanup : openssh-5.3p1-84.1.el6.x86_64 9/10
Cleanup : openssl-1.0.0-27.el6.x86_64 10/10
Verifying : openssh-askpass-5.3p1-104.el6_6.1.x86_64 1/10
Verifying : openssh-server-5.3p1-104.el6_6.1.x86_64 2/10
Verifying : openssl-1.0.1e-30.el6.8.x86_64 3/10
Verifying : openssh-5.3p1-104.el6_6.1.x86_64 4/10
Verifying : openssh-clients-5.3p1-104.el6_6.1.x86_64 5/10
Verifying : openssh-server-5.3p1-84.1.el6.x86_64 6/10
Verifying : openssh-askpass-5.3p1-84.1.el6.x86_64 7/10
Verifying : openssh-5.3p1-84.1.el6.x86_64 8/10
Verifying : openssl-1.0.0-27.el6.x86_64 9/10
Verifying : openssh-clients-5.3p1-84.1.el6.x86_64 10/10
Updated:
openssh-server.x86_64 0:5.3p1-104.el6_6.1
Dependency Updated:
openssh.x86_64 0:5.3p1-104.el6_6.1
openssh-askpass.x86_64 0:5.3p1-104.el6_6.1
openssh-clients.x86_64 0:5.3p1-104.el6_6.1
openssl.x86_64 0:1.0.1e-30.el6.8
Complete!
[root@localhost chen]# service sshd restart
停止 sshd: [失败]
生成 SSH2 RSA 主机键: [确定]
生成 SSH1 RSA 主机键: [确定]
正在生成 SSH2 DSA 主机键: [确定]
正在启动 sshd: [确定]
[root@localhost chen]# ipconfig
bash: ipconfig: command not found
[root@localhost chen]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:5C:59:1F
inet addr:192.168.14.129 Bcast:192.168.14.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe5c:591f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:66157 errors:0 dropped:0 overruns:0 frame:0
TX packets:40568 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:92486922 (88.2 MiB) TX bytes:2883456 (2.7 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:13 errors:0 dropped:0 overruns:0 frame:0
TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:789 (789.0 b) TX bytes:789 (789.0 b)