I'm writing an SSH server in Golang. Currently I have a server which can read and write from/to the client. When the client presses the delete key the server receives unicode character 13 (delete). I can rewrite the current line by sending all but the deleted character to the client. However, it only rewrites as many characters as I send. This means the last characters don't get re-written until new characters are entered. Does anyone know what the server needs to send in order for characters to be deleted from the client.
Client
Operating system: Ubuntu 16.04
Ssh version: 1.2.12
Bash version: 4.3