I am seeing strange behavior when trying to store the output of an SSH check to see if I have SSH access to an account. I tried the following:
ssh git@bitbucket.org > temp.txt
and I expect a string message telling me if permission was denied or not to be saved to temp.txt
. But the output goes straight to the terminal and isn't saved to file. But, if I do
ls -l > temp.txt
that output is saved to file. What could be causing this difference in behavior? I'm ultimately going to be saving the output to a variable but see similar behavior for that case as well. I'm on Ubuntu 16.04 bash version 4.3.48(1).