- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 CentOS 6.8 上为 SSH 服务器设置公钥认证时遇到问题。奇怪的是,当我使用 postgres 用户登录时它运行良好,但是当我使用通过安装 barman 自动创建的 'barman' 用户登录时,它总是需要密码。
'postgres' 用户的主目录和 barman 用户的主目录在同一个文件夹中。我认为这个问题与 sshd 配置无关,试图将 barman 的 home 路径、.ssh 路径和 authorized_keys 的权限设置为与 postgres 相同。但它仍然不起作用。
这是我运行后得到的 ssh localhost -vvv
:
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [::1] port 22.
debug1: Connection established.
debug3: Not a RSA1 key file /var/lib/barman/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /var/lib/barman/.ssh/id_rsa type 1
debug1: identity file /var/lib/barman/.ssh/id_rsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug3: Wrote 960 bytes for a total of 981
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14- sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-dss- cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256- ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac- sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug3: Wrote 24 bytes for a total of 1005
debug2: dh_gen_key: priv key bits set: 139/256
debug2: bits set: 514/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: Wrote 144 bytes for a total of 1149
debug3: check_host_in_hostfile: host localhost filename /var/lib/barman/.ssh/known_hosts
debug3: check_host_in_hostfile: host localhost filename /var/lib/barman/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 1
debug1: Host 'localhost' is known and matches the RSA host key.
debug1: Found key in /var/lib/barman/.ssh/known_hosts:1
debug2: bits set: 523/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: Wrote 16 bytes for a total of 1165
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug3: Wrote 48 bytes for a total of 1213
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /var/lib/barman/.ssh/id_rsa (0x7f6ef1fcc740)
debug3: Wrote 64 bytes for a total of 1277
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup gssapi-keyex
debug3: remaining preferred: gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_is_enabled gssapi-keyex
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug2: we did not send a packet, disable method
debug3: authmethod_lookup gssapi-with-mic
debug3: remaining preferred: publickey,keyboard-interactive,password
debug3: authmethod_is_enabled gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
debug3: Trying to reverse map address ::1.
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_498' not found
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_498' not found
debug1: Unspecified GSS failure. Minor code may provide more information
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_498' not found
debug2: we did not send a packet, disable method
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /var/lib/barman/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug3: Wrote 368 bytes for a total of 1645
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
barman@localhost's password:
最佳答案
用户主目录中的 authorized_keys 文件具有错误的上下文。在这个例子中,文件的上下文是“unconfined_u:object_r:httpd_sys_content_t:s0”。运行 sshd 的上下文无权访问此上下文,导致 SELinux 拒绝访问该文件。由于无法访问该文件, key 身份验证失败。
运行以下命令将其重置:
chcon -R unconfined_u:object_r:user_home_t:s0 /path/to/users/homedirectory/.ssh/
关于authentication - SSH 公钥认证不仅对特殊用户有效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42783711/
我以一种特殊的方式收到以下错误。 The point at which the driver is attempting to click on the element was not scrolle
我有一些包含如下方法的编译库: public boolean foo(String userID) { Class ntSystemClass = Thread.currentThread()
假设我有下表 name | genre --------------------- book 1 | scifi book 2 | horror book 3
我正在用代码进行语言翻译。 self.title.text = [NSString stringWithFormat:NSLocalizedString(@"Q%ld", nil), (long)qu
我想这样做,但到目前为止,我所拥有的只是: print("Will you go out with me?") 我希望代码能够正常工作,以便人们可以回答“是/否”,如果回答是"is",则将返回一条消息
这个问题在这里已经有了答案: 关闭 11 年前。 Possible Duplicate: How can I decode html characters in c#? 我有来自 HTML 的字符,
我想在 JavaScript 中对以下形式的字符串执行 ucwords(),它应该返回 Test1_Test2_Test3。 我已经在 SO 上找到了一个 ucwords 函数,但它只需要空格作为新词
“任何长度的正数表示为数字字符数组,因此介于‘0’和‘9’之间。我们知道最重要的密码位于数组索引 0 的位置。 例子: - 号码是 10282 - 数组将是数字 = [1,0,2,8,2] 考虑到这一
我目前正在开发一个显示特殊 unicode 字符(例如 ꁴ)的应用 现在我遇到了在旧设备上无法显示这些符号的问题。我如何知道它是否适用于当前设备? 我是否必须为每个 SDK 版本创建一个虚拟 Andr
在 HTML、XML 和部分 DTD 中,有两种特殊的标记结构: 以感叹号开头的标签结束,例如 和 以问号开头的标签 ,例如 和 我的问题是,这些构造类型中的每一种是否都有不同的名称,或者我是否必
我目前正在用 python 构建一个 shell。shell 可以执行 python 文件,但我还需要添加使用 PIPE 的选项(例如“|”表示第一个命令的输出将是第二个命令的输入)。 为了做到这一点
我的 MVC 项目中的路由无法正常工作... 我希望我所有的 View 都在 Views > Shared 文件夹中,如下所示: Error.cshtml (default) Index.cshtml
我有一个函数: public static ImageIcon GetIconImageFromResource(String path){ URL url = ARMMain.class.g
好的,所以我想在我的 html 页面中包含下面的字符。看起来很简单,只是我找不到它们的 HTML 编码。 注意:我想在没有大小元素的情况下执行此操作,纯文本就可以了 ^_^。 干杯。 最佳答案 你可以
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 3 年前。
我是 C# 的新手,正在尝试使用 ASP.Net GridView(框架 3.5),当 gridView 文本包含以下内容时,我发现了一个大问题: ñ/Ñ/á/Á/é/É/í/Í/ó/Ó/ú/Ú or
在 Java 中,我尝试编写一个正则表达式来匹配特殊类型的 HTTP URL: http:///# 所以字符串有 4 段: 字符串文字:“http://”;那么 任意 1 个以上字符的字符串;那么 字
当我写查询时,我在表中有“to”列 SELECT to FROM mytable mysql_error 返回错误,如果将单词to插入``引号,即 SELECT `to` FROM mytable 查
我遇到了一个问题。事实上,我使用越南语文本,我想找到每个包含大写字母(大写字母)的单词。当我使用“re”模块时,我的函数 (temp) 没有捕捉到像“Đà”这样的词。另一种方法 (temp2) 是一次
在我的文本中,我想用一个空格替换以下特殊字符: symbols = ["`", "~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_",
我是一名优秀的程序员,十分优秀!