kaili开启sshd服务

使用xshell远程连接kali 2.0时要开启kaili上的sshd服务,具体方法如下:

命令: vim /etc/ssh/sshd_config
# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 1024

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
PermitRootLogin yes >此处改为yes
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile    %h/.ssh/authorized_keys

# Don‘t read the user‘s ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don‘t trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes 此处改为yes

# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

# Set this to ‘yes‘ to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to ‘no‘.
UsePAM yes
时间: 2024-10-15 23:13:01

kaili开启sshd服务的相关文章

OpenSuSe开启sshd服务

需要测试OpenSuSE11 x64上mysql性能,发现很多东西与centos以及红帽有差别.其中最切身的就是sshd服务的开启. 安装好OpenSuSE 11后,发现ssh连接不上去,可以ping通,telnet不行.查看服务后,发现ssh服务没有开启.开启步骤:1.修改sshd_config文件.将#PasswordAuthentication no的注释去掉,并将no改为yes 3.将#PermitRootLogin yes的注释掉 4.重新启动SSH服务:/etc/init.d/ssh

BackTrack 5 开启SSHD服务

BackTrack 5 开启SSHD服务 1 service ssh start 但启动后,仍然无法从远程连接,会有提示: 1 Read from socket failed: Connection reset by peer 这个时候需要生成密钥文件,方法如下 1 2 3 #ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key #ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key #sshd-generate 现

linux(red hat)开启sshd服务

1.设置sshd服务开机启动[[email protected] ~]# chkconfig sshd on 查看sshd开机启动状态[[email protected] ~]# chkconfig --list|grep SSHD 2.查看sshd服务状态 [[email protected] ~]# service sshd statusopenssh-daemon (pid  3378) is running... 3.停止sshd服务[[email protected] ~]# serv

Docker中开启sshd服务

ssh服务安装 安装ssh服务 #yum install openssh-server -y 安装passwd(修改密码需要) #yum install passwd -y 修改sshd_config配置文件 UsePAM yes改成UsePAM no 关闭主机selinux 当使用passwd修改容器中root密码的时候,会报错:passwd: system_u:system_r:initrc_t:s0 is not authorized to change the password of r

ubuntu开启sshd服务(转)

SSH分客户端openssh-client和openssh-server如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudo apt-get install openssh-client),如果要使本机开放SSH服务就需要安装openssh-serversudo apt-get install openssh-server然后确认sshserver是否启动了:ps -e |grep ssh如果看到sshd那说明ssh-server已经

linux查看与开启sshd服务

1.首先通过物理终端进入到linux上,手工检查ssh发现没运行/etc/init.d/sshd statussshd is stopped 手工启动服务,发现报告权限错误./etc/init.d/sshd start Starting sshd:/var/empty/sshd must be owned by root and not group or world-writable.[FAILED] 使用rpm -V 命令可检查到ssh的软件包正常,但某个目录的属主错误.rpm -V open

Centos7开启SSH服务

1.检查openssh-server,可以在终端中输入  yum list installed | grep openssh-server 来检查服务,如果未安装 yum install openssh-server 来安装服务. 2. 找到了  /etc/ssh/  目录下的sshd服务配置文件 sshd_config,用Vim编辑器打开将文件中,关于监听端口.监听地址前的 # 号去除 然后开启允许远程登录 最后,开启使用用户名密码来作为连接验证 保存文件退出 3.开启sshd服务 syste

win10下Linux子系统开启ssh服务

原文地址:http://whosmall.com/?post=430 本文标签: 开启ssh Linux子系统 虽然win10自带的bash功能已经很丰富,操作也简便,不过习惯了用xshell, 还是选择用xshell来操作 直接用xshell连接127.0.0.1 端口22 提示连接失败.说明应该是ubuntu的sshd服务设置有问题: 解决方案如下: 安装ssh apt-get install openssh-server 备份sshd配置文件 sudo cp /etc/ssh/sshd_c

云服务器 ECS CentOS 7 下重启 sshd 服务操作方法

在云服务器 ECS Linux CentOS 7 下重启服务不再通过 service  操作,而是通过 systemctl 操作. 操作说明如下: 1. 查看 sshd 服务是否启动: 看到上述信息就可以确定是启动了. 2. 如果没有启动,则需要启动该服务: systemctl start sshd.service 3. 重启 sshd 服务: systemctl restart sshd.service 4. 设置服务开启自启: systemctl enable sshd.service