小编F21*_*F21的帖子

SSH 公钥 - 没有可用的受支持的身份验证方法(服务器发送的公钥)

我在虚拟机中有一个 12.10 服务器设置,其网络设置为桥接(基本上将被视为连接到我的交换机的计算机)。

我通过安装 opensshdapt-get并且能够使用我的用户名和密码使用腻子连接到服务器。

然后我开始尝试让它使用公钥/私钥身份验证。我做了以下事情:

  1. 使用 PuttyGen 生成密钥。
  2. 将公钥移动到/etc/ssh/myusername/authorized_keys(我正在使用加密的主目录)。
  3. sshd_config像这样设置:

    PubkeyAuthentication yes
    AuthorizedKeysFile /etc/ssh/%u/authorized_keys
    StrictModes no
    PasswordAuthentication no
    UsePAM yes
    
    Run Code Online (Sandbox Code Playgroud)

当我使用 Putty 或 WinSCP 进行连接时,我收到一条错误消息,提示没有可用的支持的身份验证方法(服务器发送了公钥)。

如果我sshd在调试模式下运行,我会看到:

PAM: initializing for "username"
PAM: setting PAM_RHOST to "192.168.1.7"
PAM: setting PAM_TTY to "ssh"
userauth-request for user username service ssh-connection method publickey [preauth]
attempt 1 failures 0 [preauth]
test whether pkalg/pkblob are acceptable [preauth[
Checking blacklist file /usr/share/ssh/blacklist.RSA-1023
Checking blacklist file /etc/ssh/blacklist.RSA-1023
temporarily_use_uid: 1000/1000 (e=0/0)
trying …
Run Code Online (Sandbox Code Playgroud)

server ssh

105
推荐指数
6
解决办法
93万
查看次数

在 Windows 共享上安装软件包时出现 Npm 错误

我在 Windows 8 主机上以 VMware 来宾身份运行 Ubuntu 12.10。

我在我的 Windows 8 主机上共享了一个文件夹,它在启动时使用以下条目安装在 Ubuntu 来宾中fstab

//myhost/work /work cifs credentials=/home/user/.smbcredentials,noserverino,nounix,uid=user,gid=user,file_mode=0777,dir_mode=0777 0 0 
Run Code Online (Sandbox Code Playgroud)

该共享工作正常,并且能够由诸如 nginx 之类的网络服务器提供服务。

但是,当我使用 npm 安装 node.js 包时似乎有问题,我收到了一堆这样的错误:

user@ubuntu:/work/test$ sudo npm install grunt
npm http GET https://registry.npmjs.org/grunt
npm http 304 https://registry.npmjs.org/grunt
...
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/work/test/node_modules/grunt/node_modules/lodash'
npm ERR! error rolling back  grunt@0.4.1 { [Error: ENOTEMPTY, rmdir '/work/test/node_modules/grunt/node_modules/lodash']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! …
Run Code Online (Sandbox Code Playgroud)

permissions cifs shared-folders windows-8 npm

53
推荐指数
2
解决办法
5万
查看次数

标签 统计

cifs ×1

npm ×1

permissions ×1

server ×1

shared-folders ×1

ssh ×1

windows-8 ×1