Linux – PuTTY closes after login

bashlinuxputtysshunix

I'm logging in through my schools host and everything works fine, I exited earlier and now anytime I try to log back in, PuTTY automatically closes. I also used the Google Shell to see if it was an issue with PuTTY but I still get logged out. Here is the output I get:

Last login: Tue Feb 14 21:51:02 2017 from rsrch-bd09s72.ucads.uc.edu
/home/ep69674/.profile[3]: Class: not found [No such file or directory]
/home/ep69674/.profile[7]: 1.: not found [No such file or directory]
/home/ep69674/.profile[14]: 2.: not found [No such file or directory]
/home/ep69674/.profile[15]: what: not found [No such file or directory]
/home/ep69674/.profile[22]: 3.: not found [No such file or directory]
/home/ep69674/.profile[29]: 4.: not found [No such file or directory]
/home/ep69674/.profile[32]: ________________: not found [No such file or directory]
/home/ep69674/.profile[36]: 5.: not found [No such file or directory]
/home/ep69674/.profile: line 36: syntax error: `(' unexpected
Connection to rwclinux.rwc.uc.edu closed.
NaCl plugin exited with status code 3.

Side note: I'm also using SSH

Best Answer

It seems as though your .profile file has become corrupted, and is preventing your account from logging in.

This will likely require you to contact your system administrator to fix the file.

I've looked through a few "How to bypass .profile on login" articles, and though I don't have access to PuTTY to see if these flags can be set somehow, specifying bash --noprofile as the remote command might allow you to login.

Someone also reported that they were able to regain control by sending Control-C during the login process.

Should you be able to get access to your account this way, you may wish to run

mv .profile .profile-copy

so you can get back into your account without trickery in the future.

Related Question