• Bad owner or permissions on .ssh/config

    日期:

    Bad owner or permissions on .ssh/config The file has bad permissions. If you get this error try: chmod 600 * inside the .ssh folder. according to the manual of openssh ~/.ssh/config This is the per-user configuration file. This file is used...

  • 修改ssh端口

    日期:

    1、修改ssh配置文件: 1 vim/etc/ssh/sshd_config #Port 22 改为: Port 22 Port 22222 保存并退出 重启ssh服务: 1 /etc/init.d/sshdrestart 2、修改iptales防火墙配置,开放22222端口访问: 1 2 3 /sbin/iptables-IINPUT-ptcp--dport22222-jACCEPT /etc/rc...

  • ssh远程防止掉线

    日期:

    在 /etc/ssh/sshd_config 文件里添加以下两行: ClientAliveInterval 30 ClientAliveCountMax 10 重启sshd服务 /etc/init.d/sshd restart...

  • 解决ssh连接超时时间(ssh timeout)的设置方法

    日期:

    本文介绍下,linux中ssh连接超时时间的设置方法,以避免总是被强行退出。有需要的朋友,参考下吧。 有关修改ssh连接超时时间的方法,网上介绍的很多了。 比如下面这个: 可以减少ssh连接超时等待的时间: 方法:ssh -o ConnectTimeout=3 192.168.0.10 或修改s...

  • SSH 一连接上就断开

    日期:

    PAM: pam_open_session(): Cannot make/remove an entry for the specified session SSH 一连接上就断开 调试信息输出: debug1: key_parse_private2: missing begin marker debug1: read PEM private key done: type RSA debug1: private host key: #0 type...

  • Linux上安装使用SSH(ubuntu & redhat)

    日期:

    Ubuntu安装使用SSH ubuntu默认并没有安装ssh服务,如果通过ssh链接ubuntu,需要自己手动安装ssh-server。判断是否安装ssh服务,可以通过如下命令进行: xjj @xjj -desktop:~$ ssh localhost ssh: connect to host localhost port 22 : Connection refused 如...

  • mosh:一个基于 SSH 用于连接远程 Unix/Linux 系统的工具

    日期:

    Mosh 表示 移动 Shell ( Mobile Shell ) ,是一个用于从客户端跨互联网连接远程服务器的命令行工具。它能用于 SSH 连接,但是比 Secure Shell 功能更多。它是一个类似于 SSH 而带有更多功能的应用。程序最初由 Keith Winstein 编写,用于类 Unix 的操作系...

  • ssh 无密码登陆

    日期:

    一、单向无密码访问 单向无密码访问远程服务器操作比较简单,比如服务器A需要无密码访问服务器B(AB),那么只需要在服务器A生成密钥对,将生成的公钥上传到服务器B的相关用户目录下的.ssh目录中(没有的话手动创建,注意,它的目录权限是700),并将公钥文件名...

  • SSH访问控制,多次失败登录即封掉IP,防止暴力破解

    日期:

    一、系统:CentOS6.3 64位 二、方法:读取/var/log/secure,查找关键字 Failed,例如(注:文中的IP地址特意做了删减): Sep 17 09:08:09 localhost sshd[29087]: Failed password for root from 13.7.3.6 port 44367 ssh2 Sep 17 09:08:20 localhost sshd[...

  • ssh连接经常超时和ssh连接很慢的原因分析及解决方法

    日期:

    ssh远程连接有几台机器一直很慢,今晚特么的实在忍受不了,决定看一下。 要知道为什么连接很慢,有个-v参数可以打出debug信息(该参数也可以是-vvv,会更详细一点,貌似其它有些应用也会用-v参数作为debug参数),对帮助问题很有用。 大概类似这样的代码: 01 A...