How to exit debian server terminal?

I have an situation that are quite strange to me. I am not able to exit the server terminal and enter back into my home computer terminal by the command

exit

like I used to be able to exit the server terminal with before. I end up into my root shell again without even typing the root password like I usually type

su

for accessing the root shell after having confirmed the root password.

I just checked to find out how the terminal were replying for adding and example for the situation but the situation seemed to be different while I now tried again. I guess I am not in the need of an solution right away other than to the experience of not understanding the situation that now seem to be solved.

Regards Jonathan Sander Stensvold Hol.

When you say

do you mean you're connecting to a server using a network protocol such as ssh or telnet?
If after typing exit you're not back into your

there can be more than 1 session currently opened. Try typing exit one or 2 more times and see what happens.
Let us know how it goes.

I use an SSH connection to my server host. I am the most certain about not being directed off from the server host because of the username used at the server. I tried typing the command

exit 

several times at least more than a few like most definitely one to three times maybe five. I only had one terminal connection running and ended the session by closing the terminal window at the home computer without having been able to break off the connection inside of the window while closing the terminal window at my desktop.

I am uncertain about what you mean by one session but I had only one terminal window in use, and I am totally certain about only having one login through the SSH connection.

Jonathan Sander Stensvold Hol.

Something is not as you describe. Try

#~

Next time you encounter this. You may actually be in the system console and exit will not end your terminal session.

Thank you very much!, I will try to do just that if a similar situation occur again.

Jonathan Sander Stensvold Hol.

I encountered the same problem again and solved the issue by the code

#-

while having exited root terminal and before the next exit code

exit

would have placed me back into root terminal again.

I were then able to terminate the server connection. Thank you very much!

Jonathan Sander Stensvold Hol.

Actualy its just a question of how deep you are 'sub-shell'ed/chroot'ed/ssh'd/[sl]ftp'd/... : :cool:

Example: (the bold exit's are the one's typed)

:) ~ $ csh
[simon@localhost ~]$ bash
:) ~ $ zsh
[simon@localhost]~% su
Passwort: 
+ /home/simon # csh
[simon@localhost simon]# zsh
[root@localhost]/home/simon# exit
[simon@localhost simon]# exit
exit
:) /home/simon # exit
exit
[simon@localhost]~% exit
 ~ $ exit
exit
[simon@localhost ~]$ exit
exit
 ~ $ 

hth

EDIT:
If you're often are ssh'ing to other systems, i'd change the PS1 to something that indicates me where i am.
Eg:

PS1="\h \\$ "