I have no idea how this happened. I was messing with SSH tunneling into my Raspberry Pi (with no problems) and since then, every time I open terminal on my Ubuntu machine, it tries to ssh into the RPi. When not connected to a network, I actually have to press Ctrl+C
before I get my terminal back or else wait for it to fail.
In my attempts to fix this, I have gone so far as to completely remove openssh-client
, openssh-server
, and ssh from my machine. The only change is that upon launching, terminal now informs me that ssh isn't installed (I presume this is because it is trying to run an ssh command every time). To be clear, this is the FIRST thing that comes up when I launch terminal:
The program 'ssh' is currently not installed. You can install it by typing:
sudo apt-get install openssh-client
username@username-ThinkPad-X230:~$
What did I do and how do I stop terminal from trying to run ssh every time it opens?
EDIT/UPDATE: I have played around with restoring my .bashrc
file from /etc/skel/
and discovered that when I have NO .bashrc
file in /HOME/
my terminal initializes correctly (i.e. without running ssh). However, as soon as I restore even the default .bashrc
from /etc/skel/
, I get the ssh prompt popping up again every time.
EDIT/UPDATE: I am officially an idiot! Indeed, .bashrc
was sourcing a file that caused the problem. In fact, it was only .bash_aliases
. I, in my infinite ineptitude, added an alias to shell into my pi without prefixing alias
so it was running the command every time .bashrc
ran the line. sigh
.bashrc
?