Windows使用SSH管理Ubuntu

欢迎访问个人新博客:http://www.milkcu.com/blog/html

原文地址:http://www.milkcu.com/blog/archives/manage-ubuntu-on-windows-using-ssh.html算法

原创:Windows使用SSH管理Ubuntushell

做者:MilkCuubuntu

摘要:SSH是转为远程登陆会话和其余网络服务提供安全性的协议,SSH包含客户端和服务器两部分,本文主要讲解了如何在Windows下配置和使用SSH协议管理Ubuntu。windows

SSH协议介绍

SSH是Secure Shell的缩写,是一项建立在应用层和传输层基础上的的安全协议,为计算机的shell提供安全的传输和使用环境。SSH是专为远程登陆会话和其余网络服务提供安全性的协议,另外一优势是其传输的数据能够通过压缩加快传输速度。安全

最初的SSH受版权和加密算法等的限制,如今不少人都转而使用开源免费的OpenSSH。服务器

Ubuntu搭建SSH服务器

SSH分为opeenssh-client和openssh-server。网络

Ubuntu默认已经安装openssh-client,能够用来登录别的机器。ssh

若是本机想开放SSH服务,就要安装openssh-server,固然openssh-client可能由于版本问题而从新安装。测试

下面把我在Ubunt 12.04下安装openssh-server的过程记录一下。

(1)尝试安装openssh-server软件包:

sudo apt-get install openssh-server

可是有两个错误提示须要解决

(2)安装指定版本的openssh-client

错误提示以下所示:

The following packages have unmet dependencies:
 openssh-server : Depends: openssh-client (= 1:5.9p1-5ubuntu1) but 1:5.9p1-5ubuntu1.1 is to be installed

这条错误的意思是,要安装的openssh-server的依赖软件包openssh-client版本不知足要求。

解决方案就是先安装指定版本的openssh-client。

sudo apt-get install openssh-client=1:5.9p1-5ubuntu1.1

(3)安装ssh-import-id

还有一条提示以下所示,意思就是这个软件没安装。

Recommends: ssh-import-id but it is not going to be installed

咱们能够经过下面的命令安装:

sudo apt-get install ssh-import-id

(4)测试是否安装成功

ps -e | grep ssh

若是看到sshd说明openssh-server已经启动。

(5)服务配置

ssh-server配置文件位于/etc/ssh/sshd_config,在这里能够定义SSH的服务端口,默认端口是22

中止服务

sudo /etc/init.d/ssh stop

启动服务

sudo /etc/init.d/ssh start

Windows安装SSH客户端

咱们能够经过SSH客户端在Windows上管理Linux,下面推荐两款SSH客户端,点击或经过下面的超连接下载。

putty开源免费小巧的客户端

http://milkcu.qiniudn.com/file/putty-0.63-installer.exe

Xshell面向学校和家庭免费

http://milkcu.qiniudn.com/file/Xshell4.exe

参考

[1] ubuntu开启SSH服务 - nodot - 博客园, http://www.cnblogs.com/nodot/archive/2011/06/10/2077595.html

[2] Secure Shell - 维基百科,自由的百科全书, http://zh.wikipedia.org/wiki/Secure_Shell

(全文完)

本文地址:http://www.milkcu.com/blog/archives/manage-ubuntu-on-windows-using-ssh.html

相关文章
相关标签/搜索