1

on a debian shell i can connect to a sftp by: ( connection established, i see the sftp prompt )

sftp -i /keys/mykey user@1.2.3.4

i want to change to

sftp -oCiphers=aes256-ctr -i /keys/mykey user@1.2.3.4

used in a script. how can i see, what cipher is used by the first command and how can i verify that aes256-ctr is used in the second command ? thanks for any help

FatFreddy
  • 125
  • 1
  • 5

1 Answers1

1

Call sftp with -v, you should see a message similar to this:

debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none

The cipher: field indicates the negotiated cipher, this is the message I got connecting to an arbitrary server.

With -o Ciphers=aes256-ctr I get:

debug1: kex: server->client cipher: aes256-ctr MAC: umac-128-etm@openssh.com compression: none
debug1: kex: client->server cipher: aes256-ctr MAC: umac-128-etm@openssh.com compression: none
fuero
  • 9,591
  • 1
  • 35
  • 40