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-48833

Adron's questions

Martin Hope
Adron
Asked: 2016-08-27 17:16:19 +0800 CST

Google Cloud 实例上的 Terraform ssh 错误?

  • 2

我今天一直在解决 Terraform Provisioner 与 ssh 的连接问题。到目前为止,我已经尝试过我以前认为的方法:

  provisioner "remote-exec" {
    inline = [
      "echo ${google_compute_instance.testing-elastic-1.network_interface.0.access_config.0.assigned_nat_ip}"]
      connection {
        type = "ssh"
        user = "root"
        private_key = "${file("~/.ssh/google_compute_engine")}"
        timeout = "45s"
      }
  }

但我不断收到以下错误。

Error applying plan:

1 error(s) occurred:

* ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

我还尝试在终端使用 ssh 直接登录 IP。

ssh -i ~/.ssh/google_compute_engine.pub 122.122.122.122

这工作得很好。所以我也在配置中尝试了这个,或者我认为在配置中会模仿这个。

provisioner "remote-exec" {
  inline = [
    "echo ${google_compute_instance.testing-elastic-1.network_interface.0.access_config.0.assigned_nat_ip}"]
    connection {
      type = "ssh"
      user = ""
      private_key = "${file("~/.ssh/google_compute_engine")}"
      timeout = "45s"
    }
}

又遇到一个错误。

申请计划时出错:

发生 1 个错误:

  • ssh:握手失败:ssh:无法验证,尝试的方法[无公钥],没有支持的方法

所以我尝试了这个。

provisioner "remote-exec" {
  inline = [
    "echo ${google_compute_instance.testing-elastic-1.network_interface.0.access_config.0.assigned_nat_ip}"]
    connection {
      type = "ssh"
      private_key = "${file("~/.ssh/google_compute_engine")}"
      timeout = "45s"
    }
}

最后,似乎什么都没有改变。我马上回来了这个错误消息。

Error applying plan:

1 error(s) occurred:

* ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

我不确定我还应该拥有或需要什么才能使 ssh 身份验证正常工作。

ssh google-cloud-platform google-compute-engine terraform
  • 1 个回答
  • 3359 Views
Martin Hope
Adron
Asked: 2016-07-15 10:52:29 +0800 CST

通过 301 子域重定向到 NGINX 中的 URI/URL 配置错误

  • 0

尝试在 NGINX 中将简单的子域重定向到 URI/URL 路径。此时我想让 nginx.somedomain.com 永久重定向到 nginx.somedomain.com/sample/redirection.html。我在 nginx.conf 文件中有以下配置,但无法正常工作。我已经重新启动了服务器,但仍然不行。具体来说,它会出错并在 nginx.conf 文件中显示为无效。这应该去哪里,这甚至是正确的吗?

server {
  server_name  nginx.somedomain.com;
  rewrite ^(.*) http://nginx.somedomain.com/sample/redirection.html permanent;
}

感谢您的帮助!

nginx 301-redirect
  • 1 个回答
  • 458 Views
Martin Hope
Adron
Asked: 2016-04-19 10:03:43 +0800 CST

使用 Terraform 创建 GCE 实例,附加辅助磁盘时出错?

  • 1

我的 terraform 文件看起来像这样。

resource "google_compute_disk" "sqlserversecondary" {
    name = "sql-server-secondary"
    type = "pd-ssd"
    zone = "us-central1-a"
    size = "512"
}

resource "google_compute_instance" "sqlserver2016rc2" {
    name = "sqlserver2016rc2"
    machine_type = "n1-highmem-8"

    tags = ["database", "sqlserver2016rc2"]
    zone = "us-central1-a"

    disk {
        image = "sqlserver2016"
        size = "120"
    }

    disk {
        image = "sql-server-secondary"
    }

    network_interface {
        network = "default"
        access_config {
            // Ephemeral IP
        }
    }

    service_account {
        scopes = ["userinfo-email", "compute-ro", "storage-ro"]
    }
}

第二个磁盘存在于 GCE 中,但在这种特殊情况下,我不断收到以下错误。

Error applying plan:

1 error(s) occurred:

* google_compute_instance.sqlserver2016rc2: Error creating instance: googleapi: Error 400: Invalid value for field 'resource.disks[1].initializeParams': ''. Cannot specify initializeParams for non-boot persistent disks., invalid
google-cloud-platform google-compute-engine terraform
  • 1 个回答
  • 3020 Views
Martin Hope
Adron
Asked: 2016-03-29 19:07:20 +0800 CST

如何在 Google Cloud 中设置隐形转发器和 URL 重定向?

  • 0

我对 Google Cloud DNS 有一些困惑。目前我有一个 DNS/名称服务器提供程序 (easydns),我的域设置有以下记录条目。

host => @ type => Stealth Forwarder 指向 => someplace.com

主机 => www 类型 => URL 重定向指向 => http://someplace.com

host => www.another type => URL Redirect 指向 => http://another.someplace.com

这些条目似乎很常见,但我不知道如何将 URL 重定向或隐形转发器添加到 Google Cloud。我一直在查看文档,但仍然对这些元素的去向感到有些困惑。有任何想法吗?

domain-name-system
  • 2 个回答
  • 690 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