For example, if I want to create an ssh tunnel and not make it take up my terminal I could use ssh -L 20000:localhost:2000 user@example.com &. However, this creates a new process and doesn't let me enter a password. (I know I could use key authentication but this is a general question about &)
How do I respond to a prompt after using & to make a new process?
linux;background process;input
You can't. At least not directly. & starts a background process. You can interact with foreground processes only. You could, however, start the process as foreground, do your password authentication, stop it with CTRL+Z and set it to background with the command bg $PID.