sshd

nc (netcat) on Mac OS X 10.8.4 gets stuck

梦想的初衷 提交于 2019-12-19 04:09:33
问题 I encountered a little issue while using the nc utility on Mac OS X, a utility i often use as a quick and dirty solution to check if a port is open and what version the daemon is running. We deployed a new set of computers the other day and i wanted to verify what version of sshd they were running, without having to leave my chair. This is the command i ran and the resulting output: $ for i in {183..200}; do echo "hello" | nc -n -w 2 -v 10.120.113.$i 22; done Connection to 10.120.113.183 22

ubuntu配置远程免密登录

南楼画角 提交于 2019-12-19 03:37:16
时间:2019年11月17日 00:06:19 配置远程免密登录 如果你需要在多台主机上搭建 Fabric 网络,请确保运行安装脚本的主机和其他主机可以正常通信且能免密登录。安装过程中脚本会通过 ssh 以及 scp 命令在远程主机上执行命令以及向远程主机复制密钥、配置文件等。 提醒一下,如果当前主机也需要搭建节点,也必须配置 root 用户的免密登录 。测试免密登录的命令如下: $ ssh root@ < host IP > 如果不能登录远程主机,请按以下方式进行配置。 配置 ssh-server,运行 ps -e | grep ssh ,查看是否有 sshd 进程,没有就执行以下命令安装: $ apt-get install openssh-server 修改 sshd 的配置文件,并允许 Root 用户远程登录: $ vim /etc/ssh/sshd_config # 找到 PermitRootLogin 配置项并修改为如下内容 PermitRootLogin yes 重启 sshd 服务: $ service sshd restart 查看当前用户是否已生成密钥对: $ ls ~/.ssh/id_rsa.pub 如果该文件不存在,则执行如下命令生成新的密钥对: $ ssh-keygen -t rsa 然后将公钥复制到需要登录的远程主机: $ ssh-copy-id -i

centos7.0 没有netstat 和 ifconfig命令问题

南笙酒味 提交于 2019-12-17 12:32:59
yum install wget 运行 yum install net-tools 就OK了 默认CentOS已经安装了OpenSSH,即使你是最小化安装也是如此。所以这里就不介绍OpenSSH的安装了。 SSH配置: 1、修改vi /etc/ssh/sshd_config,根据模板将要修改的参数注释去掉并修改参数值: Port 22 指定SSH连接的端口号,安全方面不建议使用默认22端口 Protocol 2,1 允许SSH1和SSH2连接,建议设置成 Protocal 2 其他参数根据自己的需要进行调整。配置方法详见: man ssh_config 2、修改hosts.deny 在最后面添加一行: sshd:All 3、修改hosts.allow 在最后面添加一行: sshd:All 如果为了安装可以限制访问的IP,设置如下: sshd:192.168.0.101 sshd:192.168.0.102 上述配置表示只允许101和102的服务器进行SSH连接 4、启动SSH systemctl restart sshd.service 至此SSH已经可以连接了 来源: https://www.cnblogs.com/phpgod/p/5571739.html

Centos6.5 升级Openssl + Openssh

▼魔方 西西 提交于 2019-12-17 07:32:59
xu言: 平时很懒,都不想写blog。今天(2018.05.15)开始尝试每天写一篇吧,看我自己能坚持多久! 准备工作: 为了防止在操作过程中导致ssh远程中断,首先安装一个telnet-server服务 yum install -y telnet-server chkconfig telnet on # 前提是启动了 chkconfig --list |grep "xinetd" 通过chkconfig --list 查看是否开启 这里开启后telnet 状态是 on Note: 开启后记得在防火墙里面添加23端口,不然...呵呵,你懂的 然后,在外面用你自己的远程工具使用telnet进行测试,测试成功后开始进行升级工作。 所需相关软件包资源汇总: zlib http://www.zlib.net/ pam http://mirror.centos.org/centos/6/os/x86_64/Packages/pam-devel-1.1.1-24.el6.x86_64.rpm openssl http://www.openssl.org/source/ openssh http://www.openssh.com/ 源码安装步骤: zlib 安装 tar xf zlib-1.2.11.tar.gz ./configure --prefix=/usr/local/zlib

CentOS7 系统安全的设置

一曲冷凌霜 提交于 2019-12-16 10:12:38
一、禁止root远程直接登录 # 创建普通用户,并设置密码 useradd bluceli #新建账户 passwd bluceli #设置密码 # 不允许root远程直接登录 vim /etc/ssh/sshd_config 找到 # PermitRootLogin yes 修改为 PermitRootLogin no # 重启 sshd 服务 systemctl restart sshd.service 二、修改ssh的端口 # 修改 ssh 端口 vi /etc/ssh/sshd_config 找到 #Port 22 修改为 Port 36322 # 重启 sshd 服务 systemctl restart sshd.service 来源: https://www.cnblogs.com/morgan363/p/12044183.html

cenos基本信息和ssh

偶尔善良 提交于 2019-12-13 00:29:31
无论是CentOS系统的虚拟电脑还是服务器,始终感觉直接在命令行中操作不方便;比如全选、复制、粘贴、翻页等等。比如服务器就需要在机房给服务器接上显示器、键盘才操作感觉更麻烦。所以就可借助SSH(安全外壳协议)远程操作和管理系统,不仅方便而且安全可靠。 1、登录Centos6.4系统。 示例:使用root用户登录。   注:若为非root用户登录,输入执行某些命权限不够时需加sudo。      2、查看SSH是否安装。 输入命令:rpm -qa | grep ssh   注:若没安装SSH则可输入:yum install openssh-server安装。      3、启动SSH服务。 输入命令:service sshd restart 重启SSH服务。   命令:service sshd start 启动服务 | 命令:service sshd stop 停止服务   重启后可输入:netstat -antp | grep sshd 查看是否启动22端口(可略)。      4、如何设置SSH服务为开机启动? 输入命令:chkconfig sshd on 即可。   注:若是chkconfig sshd off则禁止SSH开机启动。      5、远程访问连接Centos6.4系统。 Windows下使用:putty、SecureCRT可远程连接SSH服务。  

How to know if a service is installed

谁都会走 提交于 2019-12-12 22:42:19
问题 I'm looking for a way to check with a Python script if a service is installed. For example, if I want to check than a SSH server in installed/running/down in command line, I used : service sshd status If the service is not installed, I have a message like this: sshd.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead) So, I used a subprocess check_output to get this three line but the python script is not working. I used shell=True to get the output but it

sshd AuthorizedKeysCommand throws status 127

南楼画角 提交于 2019-12-12 04:03:15
问题 I'm attempting to construct an ssh service to allow push/pull to phabricator repos. I've dockerized all the services, and I'm currently running into an odd error that fails to execute the requisite auth script for ssh. The docker image runs both php-fpm and sshd services, with the idea of uniting ssh with the requisite php scripts. In particular, I have the following /etc/ssh/sshd_config: AuthorizedKeysCommand /usr/libexec/phabricator-ssh-hook.sh AuthorizedKeysCommandUser git AllowUsers git

How to configure Debian SSHD for remote debugging in a Docker container?

坚强是说给别人听的谎言 提交于 2019-12-11 06:34:23
问题 I'm trying to setup remote debugging to a Docker Debian container, to debug a Ruby application on my Windows laptop. This is the post that lead me in this direction: https://intellij-support.jetbrains.com/hc/en-us/community/posts/207649545-Use-RubyMine-and-Docker-for-development-run-and-debug-before-deployment-for-testing- I have the Ruby app and SSHD running in the container, though the recipe I found for configuring SSHD isn't fully compatible with the Linux distro that the Ruby image is

pam_unix(sudo:auth): conversation failed, auth could not identify password for [username]

社会主义新天地 提交于 2019-12-11 06:04:50
问题 I'm using ansible to provision my Centos 7 produciton cluster. Unfortunately, execution of below command results with ansible Tiemout and Linux Pluggable Authentication Modules ( pam ) error conversation failed . The same ansible command works well, executed against virtual lab mad out of vagrant boxes. Ansible Command $ ansible master_server -m yum -a 'name=vim state=installed' -b -K -u lukas -vvvv 123.123.123.123 | FAILED! => { "msg": "Timeout (7s) waiting for privilege escalation prompt: