服务器(Ubuntu): ~/.ssh/authorized_keys文件(在issue-user ): 只有一个公共密钥在一条线上。 没有额外的线路! 没意见! 正确的用户/组所有者 644权利 本地计算机(Windows 7): 与同一台服务器上的git用户一起工作 对issue-user不起作用 密钥对匹配 运行ssh [email protected] -vvv : debug2: key: /c/***/***/.ssh/identity (0x0) debug2: key: /c/***/***/.ssh/id_rsa (0x0) debug2: key: /c/***/***/.ssh/id_dsa (0x0) debug1: Authentications that can continue: publickey,password debug3: start over, passed a different list publickey,password debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled […]
我想允许首先使用密码为新用户通过ssh进行远程login。 之后,authentication应该限制在公钥上。 如何处理? 我的意思是如何限制第二个和下一个login到SSH密钥,但允许第一个密码。
我的gitolite安装开始要求密码suddendly,我检查了/var/log/secure文件,发现这个。 sshd[9071]: User git not allowed because account is locked sshd[9072]: input_userauth_request: invalid user git 经过一个快速的search,我已经读过这个解决scheme sudo passwd -u git 但是这给了这个答案: Unlocking password for user git. passwd: Warning: unlocked password would be empty. passwd: Unsafe operation (use -f to force) 我用-f来检查,是的,它解决了这个问题。 但是这样做是否存在安全缺陷? 我不想要这个帐户有一个密码,只使用密钥authentication。
我需要运行SSH服务器并logging任何尝试连接的客户端的IP和公钥(实际上不授予访问权限)。 用例是这样的:我将这个web应用程序部署到远程主机,在构build过程中,从github / bitbucket(git使用ssh使用键)获取一些依赖项。 现在,如果我想要这个托pipe服务器访问一些私人回购,我需要白名单它的公钥,但是主机不提供直接从文件系统读取密钥的访问。 但是我可以把它指向任何SSH主机,它将build立一个连接,大概是分发它的公钥。 我想logging这个。 任何build议感激。
我不确定是否有其他人有SSH超时的问题 我安装了一个CentOS 6.5最低限度的安装,而不用接触SSH congfig,当我通过使用putty的SSHlogin时,它永远不会超时。 我可以持续几个星期,即使闲置也不会超时 我安装了另一个新的insatll,没有触摸sshconfiguration,它每隔2分钟左右就超时 我的意思是为什么这样呢? SSH是否像硬币抛弃一样,对于某些服务器来说,比起其他服务器而言,即使使用相同的确切configuration,它也可能会更频繁地超时 任何人都经历过这个? 无论如何,我继续前进,并添加 ClientAliveInterval 60 在服务器上,仍然得到超时问题 有人可以告诉我如何有一个CONSISTENT sshconfiguration,将完全禁用超时..这将100%的时间,如预期的那样工作? 谢谢
我尝试使用SSH ProxyCommand通过跳转框连接到服务器失败。 我的configuration如下,我运行这个命令: ssh 10.0.2.54 -F ssh.config Host xxxx User ec2-user HostName xxxx ProxyCommand none IdentityFile /Users/me/.ssh/keys.pem BatchMode yes PasswordAuthentication no Host * ServerAliveInterval 60 TCPKeepAlive yes ProxyCommand ssh -W %h:%p -q ec2-user@xxxx ControlMaster auto ControlPersist 8h User ec2-user IdentityFile /Users/me/.ssh/keys.pem 结果很简单: ssh_exchange_identification: Connection closed by remote host 我怎样才能解决这个问题? 谢谢,
192-168-1-103:〜josh $ ssh-add -l 4096 SHA256:4fFdwJ71VIH8rucL9y / 3U7jxjctaFcAKmdQZPEqR0Y4 /Users/josh/.ssh/id_rsa(RSA) 4096 SHA256:41kNx5H5yDf1mv6ZNS5W5nSI77WU5qhajLYHvUe6 / 1A /Users/josh/.ssh/id_rsa(RSA) 任何想法如何来有两个相同的私人密钥?
过去一周左右,我一直在解决一个问题,而且我正在用尽想法。 我在我的Centos 7 VPS上为git服务器添加了一个新用户,并且(在几篇文章的build议下)将用户的主目录放在/var而不是/home 。 然后,我尝试使用SSHlogin到该用户,并正常工作。 但是 ,公钥validation无法正常工作。 在debugging过程中,我最终使git用户和主要用户以各种方式相同 – 他们都是sudoers,他们有相同的.ssh目录,具有相同的authorized_keys文件,甚至把git用户移到了/home ,但无济于事。 为了进一步testing,我创build了两个新用户: test1和test2 。 test1的主目录在/home ,而test2的主目录在/var 。 果然,pubkey auth为test1而不是test2 。 我不认为这是一个权限问题,因为/var具有与/home相同的权限,并且用户目录都具有正确的权限。 另外,我感到非常困惑,原来的git用户甚至在把它移到/home之后也不接受pubkey auth。 如果我在详细模式下运行ssh,我可以看到在发送密钥后发生劫持: debug1: Offering RSA public key: /home/user/.ssh/foo.key debug2: we sent a publickey packet, wait for reply debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password 连接到主用户或test1 ,它的行为是不同的: debug1: Offering RSA public key: /home/user/.ssh/foo.key debug2: […]
我正在使用CentOS 7.4.1708运行一个服务器,并且应用了所有的修补程序。 sssd是版本1.15.2。 我有一个工作sssd设置,使我能够使用存储在Active Directory中的SSH公钥login。 configuration 实例成功join,这是我的/etc/sssd/sssd.conf : [sssd] domains = EXAMPLE.COM default_domain_suffix = EXAMPLE.COM config_file_version = 2 debug_level = 7 services = nss, pam, ssh [domain/EXAMPLE.COM] ad_domain = EXAMPLE.COM debug_level = 7 krb5_realm = EXAMPLE.COM realmd_tags = manages-system joined-with-samba cache_credentials = True id_provider = ad krb5_store_password_if_offline = True default_shell = /bin/bash ldap_id_mapping = True […]
我有几个注册的密钥: $ ssh-add -l 4096 cd:43:96:9e:0c:9a:38:ae:d9:96:f0:c5:d1:bf:9d:96 alex@sunny2 (RSA) 2048 4c:eb:fc:6b:ab:a0:ff:99:c3:ff:13:0a:95:2a:68:70 ███████ (RSA) 4096 01:cc:8d:c9:3c:ca:cf:39:93:57:e5:36:91:30:c2:94 ██████(RSA) 4096 87:b3:05:9a:68:6a:2b:be:1f:6f:ce:1b:34:50:c9:01 ██████████(RSA) 2048 37:d7:c6:08:65:9e:d4:8e:57:a2:05:36:71:e3:0b:13 ███ (RSA) 2048 3c:62:aa:4e:86:6d:83:b0:f7:b8:fb:0a:db:c4:67:3b ██████ (RSA) 1024 a4:1b:cb:c9:a0:99:19:80:67:e2:1b:14:5b:7e:17:cf ███████ (RSA) 我试过ssh-add -d -d██████有select地删除,而ssh-add -D删除所有的密钥。 这似乎并没有工作。 执行完ssh-add -D , ssh-add -l的输出和以前一样。 我试过,例如, ssh-add -d alex@sunny2 ,以及密钥文件的完整path,在本例中是~/.ssh/alex_rsa 。 我也试过'wildcard-remove', ssh-add -d ~/.ssh/* 。 有趣的是我得到一个确认,关键被删除: Identity removed: .ssh/alex_rsa […]