Python SSH Server(twisted.conch) change the password prompt

161 Views Asked by At

I wrote a SSH server with Twisted Conch. When I execute "ssh [email protected]" command on the client side. My twisted SSH server will return a prompt requesting password that like "[email protected]'s password: ". But now I want to change this password prompt that like "your codes is:". Dose anyone know how to do it?

1

There are 1 best solutions below

0
On

The password prompt is part of keyboard-authentication which is part of the ssh protocol and thus cannot be changed. Technically, the prompt is actually client side. However, you can bypass security (very bad idea) and then output "your codes is"[sic] via the channel