Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied (publickey,gssapi-keyex,gssapi-with-mic) #135

Closed
jskorlol opened this issue Mar 28, 2022 · 1 comment
Closed

Permission denied (publickey,gssapi-keyex,gssapi-with-mic) #135

jskorlol opened this issue Mar 28, 2022 · 1 comment

Comments

@jskorlol
Copy link

jskorlol commented Mar 28, 2022

Why the hell is this message popping up?

Can you tell me what mistake i made ?

I don't know what to put in bastion_host_key_pair.

resource "tls_private_key" "bastion_host" {
  algorithm = "RSA"
  rsa_bits  = 4096
}

resource "aws_key_pair" "bastion_host" {
  key_name   = "bastion_user"
  public_key = tls_private_key.bastion_host.public_key_openssh
}

resource "aws_s3_bucket_object" "bucket_public_key" {
  bucket     = "bastion-s3-storage"
  key        = "public-keys/${aws_key_pair.bastion_host.key_name}.pub"
  content    = aws_key_pair.bastion_host.public_key
}

resource "local_file" "ssh_private_key" {
  filename = "${path.module}/key_pair/${aws_key_pair.bastion_host.key_name}.pem"
  file_permission = 400
  content = tls_private_key.bastion_host.private_key_pem
}

module "bastion" {
  source = "Guimove/bastion/aws"
  bucket_name = "bastion-s3-storage"
  region = "ap-north-east2"
  vpc_id = module.aws_vpc.vpc_id
  is_lb_private = "false"
  bastion_host_key_pair = aws_key_pair.bastion_host.key_name
  create_dns_record = "false"
  elb_subnets = module.aws_vpc.public_subnets
  auto_scaling_group_subnets = module.aws_vpc.public_subnets
  instance_type = "t2.nano"
  tags = {
    Name = "SSH Bastion Host",
  }
}
@jskorlol
Copy link
Author

my mistake...

ap-north-east2

not

It was ap-northeast-2.

Works very well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant