SSH connection from BASH script stops further BASH script commands
Here is what I am trying to do:
Code:
#!/bin/bash If I could also do this with the "firefox" line so that the entire term window could be closed would also be helpful. Any help is much appreciated. Thanks in advance. |
First, you might want to add the "-n" option to your SSH line, which creates a non-interactive session (in other words, you don't see a login prompt from the remote machine, it just forwards the ports).
But in general, adding "&" to the end of any command will push it into the background. In scripts, this will let other commands in the script execute even if the previous one has not completed. |
Thanks, I will try the -n. Haven't seen that in any lists of switches. I did try the '&' on the end and the connection would not work. It said something about a stdin problem.
|
More ssh help needed
OK, I tried the -n option for my ssh command and I received the following error when the script ran:
Code:
Pseudo-terminal will not be allocated because stdin is not a terminal. While the script does continue without waiting on the ssh connection, I also need the connection to make in order for the script to function properly. Thanks, |
All times are GMT -5. The time now is 05:52 PM. |