使用SecureCRT鏈接到遠程Ubuntu,鏈接失敗報The remote system refused the connection.python
進入Ubuntu系統,終端中敲入如下命令:ubuntu
ps -ef|grep ssh
在終端中敲入如下命名安裝openssh-server便可網絡
sudo apt-get install openssh-server安裝過程以下,網絡快的話兩分鐘左右,安裝完畢後再次使用ps -ef|grep ssh命令查看sshd進程是否運行,若是正常運行使用SecureCRT從新嘗試鏈接便可。
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libck-connector0 ncurses-term openssh-client openssh-sftp-server python-requests python-urllib3 ssh-import-id Suggested packages: libpam-ssh keychain monkeysphere rssh molly-guard The following NEW packages will be installed: libck-connector0 ncurses-term openssh-server openssh-sftp-server python-requests python-urllib3 ssh-import-id The following packages will be upgraded: openssh-client 1 upgraded, 7 newly installed, 0 to remove and 264 not upgraded. Need to get 1,279 kB of archives. After this operation, 3,896 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty/main libck-connector0 i386 0.4.5-3.1ubuntu2 [10.1 kB] Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty/main ncurses-term all 5.9+20140118-1ubuntu1 [243 kB] Get:3 http://security.ubuntu.com/ubuntu/ trusty-security/main openssh-client i386 1:6.6p1-2ubuntu2.3 [576 kB] Get:4 http://security.ubuntu.com/ubuntu/ trusty-security/main openssh-sftp-server i386 1:6.6p1-2ubuntu2.3 [35.6 kB] Get:5 http://security.ubuntu.com/ubuntu/ trusty-security/main openssh-server i386 1:6.6p1-2ubuntu2.3 [324 kB] Get:6 http://security.ubuntu.com/ubuntu/ trusty-security/main python-requests all 2.2.1-1ubuntu0.2 [43.0 kB] Get:7 http://us.archive.ubuntu.com/ubuntu/ trusty/main python-urllib3 all 1.7.1-1build1 [38.9 kB] Get:8 http://us.archive.ubuntu.com/ubuntu/ trusty/main ssh-import-id all 3.21-0ubuntu1 [9,624 B] Fetched 1,279 kB in 1min 37s (13.2 kB/s) Preconfiguring packages ... Selecting previously unselected package libck-connector0:i386. (Reading database ... 169027 files and directories currently installed.) Preparing to unpack .../libck-connector0_0.4.5-3.1ubuntu2_i386.deb ... Unpacking libck-connector0:i386 (0.4.5-3.1ubuntu2) ... Preparing to unpack .../openssh-client_1%3a6.6p1-2ubuntu2.3_i386.deb ... Unpacking openssh-client (1:6.6p1-2ubuntu2.3) over (1:6.6p1-2ubuntu2) ... Selecting previously unselected package ncurses-term. Preparing to unpack .../ncurses-term_5.9+20140118-1ubuntu1_all.deb ... Unpacking ncurses-term (5.9+20140118-1ubuntu1) ... Selecting previously unselected package openssh-sftp-server. Preparing to unpack .../openssh-sftp-server_1%3a6.6p1-2ubuntu2.3_i386.deb ... Unpacking openssh-sftp-server (1:6.6p1-2ubuntu2.3) ... Selecting previously unselected package openssh-server. Preparing to unpack .../openssh-server_1%3a6.6p1-2ubuntu2.3_i386.deb ... Unpacking openssh-server (1:6.6p1-2ubuntu2.3) ... Selecting previously unselected package python-urllib3. Preparing to unpack .../python-urllib3_1.7.1-1build1_all.deb ... Unpacking python-urllib3 (1.7.1-1build1) ... Selecting previously unselected package python-requests. Preparing to unpack .../python-requests_2.2.1-1ubuntu0.2_all.deb ... Unpacking python-requests (2.2.1-1ubuntu0.2) ... Selecting previously unselected package ssh-import-id. Preparing to unpack .../ssh-import-id_3.21-0ubuntu1_all.deb ... Unpacking ssh-import-id (3.21-0ubuntu1) ... Processing triggers for man-db (2.6.7.1-1) ... Processing triggers for ureadahead (0.100.0-16) ... ureadahead will be reprofiled on next reboot Processing triggers for ufw (0.34~rc-0ubuntu2) ... Setting up libck-connector0:i386 (0.4.5-3.1ubuntu2) ... Setting up openssh-client (1:6.6p1-2ubuntu2.3) ... Setting up ncurses-term (5.9+20140118-1ubuntu1) ... Setting up openssh-sftp-server (1:6.6p1-2ubuntu2.3) ... Setting up openssh-server (1:6.6p1-2ubuntu2.3) ... Creating SSH2 RSA key; this may take some time ... Creating SSH2 DSA key; this may take some time ... Creating SSH2 ECDSA key; this may take some time ... Creating SSH2 ED25519 key; this may take some time ... ssh start/running, process 5002 Setting up python-urllib3 (1.7.1-1build1) ... Setting up python-requests (2.2.1-1ubuntu0.2) ... Setting up ssh-import-id (3.21-0ubuntu1) ... Processing triggers for libc-bin (2.19-0ubuntu6) ... Processing triggers for ureadahead (0.100.0-16) ... Processing triggers for ufw (0.34~rc-0ubuntu2) ...