alt text

我不断遇到同样的错误,有什么想法吗?

  1. 我已经生成了一个没有密码的密钥 ssh-keygen
  2. 我将钥匙的权限设置为600
  3. 我已经成功登录了 ssh -i /root/.ssh/id_rsa 1**.**.*8.128
  4. 我尝试将主机名更改为 localhost127.0.0.1

服务器正在运行CentOS 5.4。

有帮助吗?

解决方案

Asker在Serverfault上回答了这个问题。我在这里添加他作为社区Wiki的答案。

这是完整的解决方案,感谢 Michaelmior 为了他的帮助,这让我一半了。

  1. 运行此命令生成密钥: ssh-keygen

    您将获得此输出:

    Generating public/private rsa key pair.
    Enter file in which to save the key (/home/user1/.ssh/id_rsa):
    Created directory ‘/home/user1/.ssh’.
    Enter passphrase (empty for no passphrase): (just hit enter, no need for a password)
    Enter same passphrase again: (same thing, hit enter again)
    Your identification has been saved in /home/user1/.ssh/id_rsa.
    Your public key has been saved in /home/user1/.ssh/id_rsa.pub.
    The key fingerprint is:
    xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx user1@server1.example.com
    
  2. 将公共密钥添加到您的 authorized_keys 文件

  3. 移动 id_rsaid_rsa.pub/usr/local

  4. chown 与您的Web服务器同一用户的文件(在我的情况下,Apache)

  5. chmod 文件到600: chmod 600 id_rsa*

现在应该起作用。

但是,我的安装不断悬挂,快速查看httpd error_log文件显示我:

PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 2966269 bytes) in /var/www/sites/....

将此代码添加到WordPress wp-config.php 文件以暂时增加可用的内存量:

define('WP_MEMORY_LIMIT', '64M');

其他提示

php是否还汇编了SSH支持?大多数主机都不包含PECL SSH扩展。

许可以下: CC-BY-SA归因
scroll top