I've got a file with SSH private key. When I try to access server with command
ssh -vvv -i key *@*.*.*.* -p2222
, it validates the key -
debug1: Trying private key: key
debug3: sign_and_send_pubkey: ED25519 SHA256:9Lxb74WbUExNBifvtYtUuqI4gebuim0hg024jSqlvDo
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 52
debug1: Authentication succeeded (publickey).
After that the connection fails, saying "This service allows sftp connections only.".
But when I try to connect through sftp with the same key
sftp -vvv -i key *@*.*.*.* -p2222
, the key is not verified anymore.
debug1: Trying private key: key
debug3: sign_and_send_pubkey: ED25519 SHA256:9Lxb74WbUExNBifvtYtUuqI4gebuim0hg024jSqlvDo
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
Can you please help me finding the problem?