I was switching a frontend to use SSH instead of HTTP for the backend, and then it hit me. HTTP is stateless, so I can send requests to a server which I don’t trust. But how about SSH? Isn’t SSH a two side channel communication?
Example: Server A executes commands on Server B with SSH. Opens, executes and closes the session.
How safe is this for Server A in case Server B gets compromised? Could an attacker potentially use this connection to log back into Server A, executes commands or pull data on the channel?
To resume is it safe for the end client to SSH into non-trusted servers?