zoukankan      html  css  js  c++  java
  • []: secureCRT连接ubuntu问题- The remote system refused the connection

    解决方案:

    1.安装openssh-server

    Ubuntu缺省安装了openssh-client,所以在这里就不安装了,如果你的系统没有安装的话,再用sudo apt-get install openssh-server安装上即可。

    1.1输入命令:sudo apt-get install openssh-server

    1.2确认openssh-server是否启动了:
          ps -e |grep ssh

    正常情况下结果为:

    1584 ?        00:00:00 ssh-agent
    2299 ?       00:00:00 sshd

    1.3如果只有ssh-agent,则openssh-server还没有启动,需要/etc/init.d/ssh start,如果看到sshd那说明openssh-server已经启动了。

    2.ssh-server配置文件位于/etc/ssh/sshd_config,在这里可以定义SSH的服务端口,默认端口是22,你可以自己定义成其他端口号,如222。然后重启SSH服务:

    sudo /etc/init.d/ssh restart

    ====================================================

    FOR CENTOS:

    [root@localhost ~]# ssh 192.168.0.78
    ssh: connect to host 192.168.0.78 port 22: Connection refused

    [root@localhost ~]# ps -e|grep ssh
    ...no result

    [root@localhost ~]# yum install openssh-server
    ...install infomation


    [root@localhost ~]# service sshd start
    Starting sshd:                                             [  OK  ]

    [root@localhost ~]# ps -ef|grep ssh
    root      19262      1  0 15:32 ?        00:00:00 /usr/sbin/sshd
    root      19267  18566  0 15:33 pts/0    00:00:00 grep ssh

    ====================================================

  • 相关阅读:
    IDEA插件备忘录
    SpringBoot2基础笔记
    EasyCode模板,配合通用mapper,dubbo项目使用
    七牛云存储
    Apache POI
    SSM项目中关于配置的一二三
    SSM整合笔记
    Spring5学习笔记
    ThinkPHP框架,按分类,计算商品价格区间,来完成价格搜索
    PHP常用符号和函数
  • 原文地址:https://www.cnblogs.com/mylinux/p/5101956.html
Copyright © 2011-2022 走看看