zoukankan      html  css  js  c++  java
  • Windows使用SSH管理Ubuntu

    欢迎访问我的新博客:http://www.milkcu.com/blog/

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

    原创:Windows使用SSH管理Ubuntu

    作者:MilkCu

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

    SSH协议介绍

    SSH是Secure Shell的缩写,是一项创建在应用层和传输层基础上的的安全协议,为计算机的shell提供安全的传输和使用环境。SSH是专为远程登录会话和其他网络服务提供安全性的协议,另一优点是其传输的数据可以经过压缩加快传输速度。

    最初的SSH受版权和加密算法等的限制,现在很多人都转而使用开源免费的OpenSSH。

    Ubuntu搭建SSH服务器

    SSH分为opeenssh-client和openssh-server。

    Ubuntu默认已经安装openssh-client,可以用来登陆别的机器。

    如果本机想开放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

  • 相关阅读:
    Insus Meta Utility
    The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
    Insus Binary Utility
    asp.net实现文件下载功能
    Column 'Column Name' does not belong to table Table
    程序已被编译为DLL,怎样去修改程序功能
    如何在Web网站实现搜索功能
    如何把数据流转换为二进制字符串
    Asp.net更新文件夹的文件
    如何显示中文月份
  • 原文地址:https://www.cnblogs.com/milkcu/p/3808922.html
Copyright © 2011-2022 走看看