cli icon indicating copy to clipboard operation
cli copied to clipboard

server rebuild --no-password flag

Open nazarkulyk opened this issue 9 months ago • 1 comments

TL;DR

There possible to hcloud create server without root password by using ssh key. But if you than want to rebuild server from image you self created, you are forced to setup password on first login. After that it can be removed again, but its kind annoing. Please provide some additional flag for rebuild server command and skip password reseting. Thanks

Expected behavior

hcloud server rebuild --image xxxxx server-bame
 ✓ Waiting for rebuild_server      100% 1m59s (server: id)                                                                                                                                                 
Server id rebuilt with image 
Root password: newPassword

After first ssh login:

Changing password for root.
Current password: 

nazarkulyk avatar Mar 14 '25 13:03 nazarkulyk

When you rebuild a server with a different image, it will re-use the SSH keys you provided when creating the server. So if you use --ssh-key with hcloud server create, after using hcloud server rebuild on that server you won't need a root password.

phm07 avatar Mar 21 '25 15:03 phm07

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

github-actions[bot] avatar Aug 29 '25 13:08 github-actions[bot]