AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-2459

allesklar's questions

Martin Hope
allesklar
Asked: 2010-01-28 09:23:22 +0800 CST

我的 Slicehost Ubuntu 服务器上的主机名错误

  • 2

像许多升级到 Rails 2.2 的人一样,我在发送电子邮件时遇到了异常。此版本的 Rails 或更高版本确实需要使用 tls 来发送电子邮件。生产日志文件中的消息说:

hostname was not match with the server certificate

我对此进行了大量研究和工作,并尽我所能。我将切片的主机名更改为 ohlalaweb.com。如果我在 CL 上运行命令“主机名”,我会得到:

ohlalaweb.com

后缀似乎工作正常。我可以毫无问题地从 CL 向我的 gmail、yahoo 和 google 应用程序 gmail 帐户发送电子邮件。这是 cat /etc/postfix/main.cf 的结果

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
myorigin = /etc/mailname

smmtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ohlalaweb.pem
smtpd_tls_key_file=/etc/ssl/certs/ohlalaweb.pem
smtpd_use_tls=yes
# SA created next line to force postfix to use self create certificate
smtpd_tls_auth_only=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = ohlalaweb.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost.localdomain, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

我已经使用 ohlalaweb.com 主机名重新生成了 ssl 密钥。

有什么想法或建议吗?

postfix ssl hostname tls
  • 1 个回答
  • 409 Views
Martin Hope
allesklar
Asked: 2009-08-07 23:59:47 +0800 CST

锁定在我的 Slicehost.com Ubuntu 盒子之外

  • 1

--- 最新编辑 -----------------------------------

感谢所有提供帮助的人,但我仍然陷入困境。我现在很绝望。除了 sshd 之外,还有其他需要重启的进程吗?不知道该往哪个方向走?还有其他想法吗?


几个月来,我设法与 ssh 连接良好,但每次都必须输入密码。我现在忘记了我在 ssh 和 keygen 的初始设置方面走了多远。

无论如何,昨天我尝试正确安装密钥并查看此页面上的设置说明。

不得不说,我没有做防火墙相关的步骤。完成此命令后:

/etc/init.d/ssh reload

从那以后,我一直无法通过密钥或密码方式登录。幸运的是,我仍然打开了一个 ssh 终端会话,所以我仍然可以修补它,但没有设法修复它。今天早上 Internet 连接中断,因此会话消失了。这是我运行“ssh -p 30000 -v [email protected]”时得到的结果

OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /Users/swamiatma/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to ohlalaweb.com [173.45.225.154] port 30000.
debug1: Connection established.
debug1: identity file /Users/swamiatma/.ssh/identity type -1
debug1: identity file /Users/swamiatma/.ssh/id_rsa type 1
debug1: identity file /Users/swamiatma/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.7p1 Debian-8ubuntu1.2
debug1: match: OpenSSH_4.7p1 Debian-8ubuntu1.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 173.45.225.154

非常感谢 Slicehost 通过他们的管理面板提供了一个控制台,我可以通过它登录。请帮忙。第一要务,无论如何我如何登录:启用telnet,ssh密码登录等?

对这种紧急情况的回答会很好。接下来我想再次通过私钥/公钥登录的过程。我想我首先需要对这个过程有更多的了解。

编辑:这是我从 auth.log 收到的消息

Aug  7 10:14:39 ohlala sudo: pam_unix(sudo:session): session closed for user root                                       
Aug  7 10:15:24 ohlala sshd[20217]: error: Could not load host key: /etc/ssh/ssh_host_rsa_key                           
Aug  7 10:15:24 ohlala sshd[20217]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key                           
Aug  7 10:15:24 ohlala sshd[20218]: fatal: No supported key exchange algorithms 

不知道我能做些什么。

编辑 2:按照 rkthkr 的建议,我重新生成了服务器密钥,这是我得到的新错误消息。

Aug  7 12:07:50 ohlala sudo: pam_unix(sudo:session): session opened for user root by deploy(uid=0)                      
Aug  7 12:07:50 ohlala sudo: pam_unix(sudo:session): session closed for user root                                       
Aug  7 12:08:51 ohlala sshd[20362]: error: Could not load host key: /etc/ssh/ssh_host_rsa_key                           
Aug  7 12:08:51 ohlala sshd[20362]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key                           
Aug  7 12:08:51 ohlala sshd[20363]: fatal: No supported key exchange algorithms                                         
Aug  7 12:09:15 ohlala sudo:   deploy : TTY=tty1 ; PWD=/home/deploy ; USER=root ; COMMAND=/usr/bin/tail -f /var/log/auth
.log -n 25                                                                                          
Aug  7 12:09:15 ohlala sudo: pam_unix(sudo:session): session opened for user root by deploy(uid=0)                      
Aug  7 12:09:15 ohlala sudo: pam_unix(sudo:session): session closed for user root
ubuntu ssh slicehost
  • 5 个回答
  • 1480 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve