ssh into ubuntu server gives "bash: warning: shell level (1000) too high, resetting to 1" every time

in flag

I have a machine set up that runs Ubuntu Desktop. I use it as a server mostly so most of the time I just ssh into it. Recently after running a docker gaming server, when I ssh into my machine, this message pops up every time

bash: warning: shell level (1000) too high, resetting to 1

and it seems to be accurate becasue if I "Ctrl+C" then I get my CLI but in order to close the connection, I have to use ~. because using "exit" just shows another line. Why am I stuck in an ssh loop? I am sshing in to Ubuntu 20.04 from windows 10

waltinator avatar
it flag
Do you have a recursive call to `~/.bashrc` in `~/.bashrc`? Check with `bash -x ~/.bashrc`.
seandburke99 avatar
in flag
@waltinator good call. Had newgrp docker in my bashrc
it flag

newgrp starts a new shell (which sources ~/.bashrc, which calls newgrp), and around we go.

An easier way to add oneself to the docker group is:

sudo adduser $USER docker

Which will take effect at your next login.

seandburke99 avatar
in flag
I appreciate it. Should've manned what it does before using it

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.