Hey folks! We’ve got some new ssh features for you. Our ssh server (hallpass) that powers the flyctl ssh *
commands now supports logging in as users other than root. Previously no matter what user you tried to log in under, as long as the authentication checked out, you would be logged in as root.
Try this out
Prerequisites
Steps
- Create an app
flyctl apps create YOURAPPNAME
- Create a new machine
flyctl m run nginx -a YOURAPPNAME
- SSH into your machine and create a user
-
flyctl ssh console -a YOURAPPNAME
-
useradd fly
(and follow the prompts)
-
-
- Create an ssh cert
flyctl ssh issue
(follow the prompts) - SSH in to your new user
ssh -i ./path-to-cert-you-made fly@yourmachineip
- check who you are
whoami
!
- check who you are
Caveats
- the sftp feature only works with root. attempting to sftp in as another user for now will result in an authentication error