The first ssh command is done on my computer, I enter the key password, then put the second ssh command in while logged into the server.
ssh -i cloudkey -L 6000:localhost:6001 email@example.com -p 9000 #i get prompted for a password to use the key ssh -D 6001 -p 6666 localhost -l dancloud #i get prompted for a password associated with user dancloud
- How can I combine these commands into a single command to obtain the same results? I see that netcat and ProxyCommand could be useful here but haven't been able to figure it out.
- How can I hardcode the two passwords in and put this into a bash script? Hopefully I could just do
./login.shand run all this code with passwords hard coded into the script and reach the same final result.