zoukankan      html  css  js  c++  java
  • linux配置ssh 【ubuntu 10.10】

    以下来自网络引用:

    1、检查本机是否安装了ssh服务

    使用命令:ssh localhost

    如果出现以下错误,则很可能是因为还没有安装ssh-server:

    ssh: connect to host localhost port 22: Connection refused

    表明还没安装ssh服务。

    2、安装SSH-server:

    sudo apt-get update

    sudo apt-get install openssh-server

    3、启动SSH-Server

    sudo /etc/init.d/ssh start

    本机,使用sudo apt-get install openssh-server之后,自动安装openssh-client等各个包;

    但使用ssh localhost无法访问,错误信息如下:

    ssh: connect to host localhost port 22: Connection refused

     通过ps -ef | grep ssh查看,确定sshd进程没有运行,可以使用sudo /etc/init.d/ssh start开启服务,但给出如下提示:

    Rather than invoking init scripts through /etc/init.d, use the service(8)
    utility, e.g. service ssh start

    Since the script you are attempting to invoke has been converted to an
    Upstart job, you may also use the start(8) utility, e.g. start ssh
    ssh start/running, process 2937

     说明,新版本的ssh中以后可以直接使用sudoservice ssh start或sudo start ssh直接控制服务的开启了。

     如果服务开启有异常或问题,可以重启电脑,再查看下服务状态。

    service ssh status

    如果出现下列错误,请保证使用sudo执行命令:

    name@Linux:~$ stop ssh
    stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.59" (uid=1000 pid=3059 comm="stop) interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply=0 destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init"))

    总结如下:

    开启ssh:sudo start ssh

    关闭ssh:sudo stop ssh

    查看ssh运行状态: service ssh status

    通过ssh localhost提示输入密码,登录,完成ssh配置,更多安全性配置,自行设置。

    windows下使用putty或SecureCRT访问ssh的文档:

    http://blog.csdn.net/backtracker/article/details/6642784
    http://ubuntu.blog.51cto.com/868790/431677
  • 相关阅读:
    win2008R2、win7不停闪屏、程序失去响应的解决办法
    “我要上春晚”刷票器
    Windows Phone 7的About模板——Your Last About Dialog
    该伙伴事务管理器已经禁止了它对远程/网络事务的支持
    安装配置apache+php+mysql小结
    [摘]CSS的优先级探讨
    利用domdrag实现flash滚动条功能
    WIN7下如何做好IE6,7的兼容性测试
    同级情况下CSS的优先级探讨
    [NHibernate] NHibernate对象关系映射工具了解
  • 原文地址:https://www.cnblogs.com/xfiver/p/2383149.html
Copyright © 2011-2022 走看看