Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: ssh disconnects immediately upon successful login

Started 3 months, 2 weeks ago by factorial
The title says it all. I recently put `exec screen -R` in my .bash_profile, and that's the only change I've made. I have disconnected/reconnected several times since then. Specifically: I get a login prompt, type my username, type my valid password, and see my 'last login' message before the puTTY window closes. If I type the incorrect password I get 'access denied' and get to try again (no ...
Site: VPSlink Forums  VPSlink Forums - site profile
Forum: My.VPSLink.com Support  My.VPSLink.com Support - forum profile
Total authors: 2 authors
Total thread posts: 6 posts
Thread activity: no new posts during last week
Domain info for: vpslink.com

Other posts in this thread:

factorial replied 3 months, 2 weeks ago
Turns out I had SCP access, so I scp'd in and renamed .bash_profile to .bash_profile.ignore and now I can ssh again. Apparently screen wasn't happy with being in .bash_profile... hope this helps someone in the future.

DanL@VPSLink replied 3 months, 2 weeks ago
screen 's default behavior will kill your present TTY session when run from a .bash_profile or .bashrc script as soon as screen successfully runs. If you plan to experiment with your login scripts, I would highly recommend adding a sleep 5 call before the experimental commands in your login script (this will give you a chance to break from the script back to the shell if you find ...

factorial replied 3 months, 2 weeks ago
Many thanks, Dan, very helpful info.

DanL@VPSLink replied 3 months, 2 weeks ago
You are most welcome - here's a more configurable alternative, should you want to experiment: Code: # screen autostart if [ $TERM != "screen" ]; then # Configuration SCRAUTO_CMD='screen -D -RR' SCRAUTO_DELAY=10 # EOF - Configuration SCRAUTO_DISPLAY=$SCRAUTO_DELAY+1 echo -n "(Ctrl+C to skip) Running "${SCRAUTO_CMD}" in " for (( i=0; i<=$SCRAUTO_DELAY; i++ )) do let ...

DanL@VPSLink replied 3 months, 2 weeks ago
... our support manager has informed me that screen -D -R added at the end of your .bash_profile script should accomplish everything the above script does in about 6% of the lines (see man screen for "Author's favorite" for full details).

 

Top contributing authors

Name
Posts
DanL@VPSLink
4
user's latest post:
ssh disconnects immediately upon...
Published (2009-09-21 01:55:00)
You are most welcome - here's a more configurable alternative, should you want to experiment: Code: # screen autostart if [ $TERM != &quot;screen&quot; ]; then # Configuration SCRAUTO_CMD='screen -D -RR' SCRAUTO_DELAY=10 # EOF - Configuration SCRAUTO_DISPLAY=$SCRAUTO_DELAY+1 echo -n &quot;(Ctrl+C to skip) Running &quot;${SCRAUTO_CMD}&quot; in &quot; for (( i=0; i&lt;=$SCRAUTO_DELAY; i++ )) do let...
factorial
3
user's latest post:
ssh disconnects immediately upon...
Published (2009-09-21 01:21:00)
Many thanks, Dan, very helpful info.

Related threads on "VPSlink Forums":

Related threads on other sites:

Thread profile page for "ssh disconnects immediately upon successful login" on http://forums.vpslink.com. This report page is a snippet summary view from a single thread "ssh disconnects immediately upon successful login", located on the Message Board at http://forums.vpslink.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity