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

beginners-guide-to-terraform should explain how to logon using ssh #4962

Open
mjbright opened this issue Dec 8, 2021 · 0 comments
Open

beginners-guide-to-terraform should explain how to logon using ssh #4962

mjbright opened this issue Dec 8, 2021 · 0 comments

Comments

@mjbright
Copy link

mjbright commented Dec 8, 2021

I created my first instance using this tutorial, it's really useful, thanks.

I have several comments about how this could be improved to enable an initial ssh connection.

root user for connection
It wasn't obvious to me that the authorised_key is for the 'root' user, I was trying with user 'ubuntu'
It would help to state this and/or provide an ssh example.
I propose to output the appropriate ssh commands - see below.

non-root user
Is there no way to specify a non-root user, or to at least enable authorized_keys for the existing - in this case - 'ubuntu' user ?

root password + authorized keys
It seems strange to me that we specify both - I guess this is for "safety"of not losing the ability to connect, but I would not use a password for root. Useful for debugging but maybe at least mention that it's unsafe.

output ssh connectivity info
I suggest adding some output statements as below (need to specify correct key of course)

output login_ipv4 { value = "ssh -i ~/.ssh/id_rsa root@${tolist( linode_instance.example_instance.ipv4 )[0]}" }
output ipv4 { value = linode_instance.example_instance.ipv4 }

output login_ipv6 { value = "ssh -6 -i ~/.ssh/id_rsa root@${linode_instance.example_instance.ipv6}" }
output ipv6 { value = linode_instance.example_instance.ipv6 }
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