deployer icon indicating copy to clipboard operation
deployer copied to clipboard

Deployer (SSH) doesn't ask for the password nicely

Open tomaszkane opened this issue 3 years ago • 12 comments

It's trival case, but confusing. When SSH waiting for password Deployer 6 prints Password: Deployer 7 prints ⠇ word: ⠴ with rolling animations...

  • Deployer version: 7.0.0-rc.8

$ dep deploy -vvv

task deploy:setup
[production] /usr/bin/php /home/deployer/vendor/deployer/deployer/deployer.phar worker --port 46827 --task deploy:setup --host production --decorated -vvv
[production] ssh '-A' '-o' 'ControlMaster=auto' '-o' 'ControlPersist=60' '-o' 'ControlPath=~/.ssh/[email protected]' '[email protected]' ': xxxxxx; bash -ls'
[production] run [ -d /var/www/foo.com ] || mkdir -p /var/www/foo.com;
cd /var/www/foo.com;
[ -d .dep ] || mkdir .dep;
[ -d releases ] || mkdir releases;
[ -d shared ] || mkdir shared;
The authenticity of host 'x.x.x.x (x.x.x.x)' can't be established.
ECDSA key fingerprint is xxxxx
ECDSA key fingerprint is xxxxx
  ⠸  ou sure you want to continue connecting (yes/no)?   ⠏ 
[production] Warning: Permanently added 'x.x.x.x' (ECDSA) to the list of known hosts.
  ⠇ word:   ⠴

This is confusing, I thought my SSH configuration was wrong or the routing network didn't allow connection and I have a timeout here.

tomaszkane avatar Jul 15 '22 08:07 tomaszkane

Some of my servers using ssh-keys so I don't always expect password ask. BTW ssh user@host prints Password: when it need password :-)

tomaszkane avatar Jul 15 '22 08:07 tomaszkane

Deployer v7 don't have this functionality any more. In v7 each task is executed inside of a worker process, so no passing on tty happends. Deployer -> Worker -> SSH -> Remote host.

antonmedv avatar Jul 15 '22 08:07 antonmedv

So we are doomed to enigmatic messages? :-|

tomaszkane avatar Jul 15 '22 08:07 tomaszkane

You can configure you ssh client to not show such messages, or just generate host keysign before connecting.

antonmedv avatar Jul 15 '22 08:07 antonmedv

Hm, yes, but now it's one of our security/permission policy: Production deploy ask for password? You don't known it? So you don't have permission to do that deploy.

tomaszkane avatar Jul 15 '22 09:07 tomaszkane

I’m not getting it. What security permissions?

Please, share what’s happening for a normal ssh user@host.

antonmedv avatar Jul 15 '22 11:07 antonmedv

In my company deployment of any project work like this:

  1. login as "deployer" user to deployment-host
  2. go to project deployment dir
  3. run dep deploy production

This always ask for password. Developers has individual accounts in https://github.com/nuxsmin/sysPass gdzie nadajemy uprawnienia do haseł dla każdego z naszych projektów. So asking password in deployment process is our security/permission to deploy. So login-via-ssh-keys to production server in deployment process is not an option.

Other words, we like when Deployer nicely asking for password when user try to deploy something on production stage.

tomaszkane avatar Jul 15 '22 11:07 tomaszkane

But what is it? passphrase for ssh key? Or just ssh password?

antonmedv avatar Jul 15 '22 13:07 antonmedv

Just SSH password.

tomaszkane avatar Jul 15 '22 13:07 tomaszkane

Yes, Deployer v7 doesn’t support ssh password. Consider switching to ssh_key.

antonmedv avatar Jul 15 '22 14:07 antonmedv

But it actually works:

$ dep deploy:is_locked production
task deploy:is_locked
  ⠧ word:   ⠼ 
[production] info Deploy is unlocked.

after ⠧ word: ⠼ I paste password from clipboard ant hit enter. So You mean, "deployer 7 works with ssh password but not officially support it" ?

tomaszkane avatar Jul 18 '22 07:07 tomaszkane

I’m suppressed it is working actually))

antonmedv avatar Jul 18 '22 07:07 antonmedv