I have a program that requires cascaded SSH, i.e. it ssh A server and then using same connection ssh B server. Server A is acting as a bridge. I have an instance of shell which is used to ssh first server. 

When I am doing ssh user@ipAddress, it asks for password. I tried ssh user@ipAddress\npassword. It doesn't seem to be working.

I cannot use any external tools like ssh-agent or expect. I have no control over the server A.

Is there a way I can provide password as an argument or enter password?

Thanks!!