LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-11-2012, 11:19 AM   #1
jim.thornton
Member
 
Registered: May 2007
Posts: 323

Rep: Reputation: 17
Weird behaviour


I just ordered a VPS running Ubuntu 12.04 LTS 64bit.

For some reason when I ssh into the machine and press the up arrow I get ^A[[ that shows. I've been searching on and off for two days and can't seem to find a solution.

Could someone please tell me how to get the history working correctly?

In addition, the .profile or .bash_profile file does not seem to be loading. I've tried setting my prompt to a color prompt but I get the same weird characters. I've tried setting the color_prompt=yes and force_color_prompt=yes but as mentioned the file doesn't seem to be loading.

The .bashrc file is only loading AFTER you enter a shell from within bash.
 
Old 07-11-2012, 11:48 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,466

Rep: Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213
what is the command you used to log in? What is your login shell?
 
Old 07-11-2012, 11:57 AM   #3
jim.thornton
Member
 
Registered: May 2007
Posts: 323

Original Poster
Rep: Reputation: 17
Not really sure what you mean. My VPS is remote so I'm using the terminal on my laptop to ssh into with:

# ssh IP.ADDRESS -p PORT

The username is the same on my laptop as the remote server so it is attempting to login (successfully) with the same username.
 
Old 07-11-2012, 12:13 PM   #4
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,466

Rep: Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213
yes, that's fine: ssh host -p port is ok. You can check your shell by executing echo $0
 
Old 07-11-2012, 12:15 PM   #5
jim.thornton
Member
 
Registered: May 2007
Posts: 323

Original Poster
Rep: Reputation: 17
$ echo $0
-sh
 
1 members found this post helpful.
Old 07-11-2012, 12:17 PM   #6
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,466

Rep: Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213
try ssh host -p port bash --login -i
 
Old 07-11-2012, 12:22 PM   #7
jim.thornton
Member
 
Registered: May 2007
Posts: 323

Original Poster
Rep: Reputation: 17
Same thing... I just tried that command to login via ssh and this is what I got after it logged in:

bash: no job control in this shell

There is still no color in the prompt and the arrow keys are still showing those weird characters.
 
Old 07-11-2012, 12:41 PM   #8
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,466

Rep: Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213
the strange behavior is caused because your login shell is sh, not bash. This is normal. You can try ssh as you did it before and execute bash on VPS. Have you modified your .profile, .bashrc or any other login related files? (and what about the /etc/profile?)
 
Old 07-11-2012, 08:49 PM   #9
jim.thornton
Member
 
Registered: May 2007
Posts: 323

Original Poster
Rep: Reputation: 17
I have edited the .bashrc and .profile files. I commented out the line saying to only load .bashrc if interactive mode.

How can I set it up to use bash instead of sh?
 
Old 07-12-2012, 12:01 PM   #10
jim.thornton
Member
 
Registered: May 2007
Posts: 323

Original Poster
Rep: Reputation: 17
I was able to get it working by going into the /etc/passwd file and changing the shell to bash.

Thanks for the help!
 
1 members found this post helpful.
Old 10-22-2012, 09:30 PM   #11
thegerm
LQ Newbie
 
Registered: May 2007
Posts: 10

Rep: Reputation: 0
I'm having the same trouble on Ubuntu 12.02 server. I login from a windows PC with Putty. One one account everything is fine, the arrow keys and history work Ok. However, on another account on same server, the arrow keys work as described here.

Both accounts show as being bash shells and there is no difference between the .login and .bashrc files for both users.

Any ideas what the issue is here
..thegerm

Update: the problem was really as Jim Thorton posted, I changed the shell type in /etc/passwd with a 'chsh' command now it it works fine.

Last edited by thegerm; 10-23-2012 at 02:23 AM. Reason: update
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Weird behaviour of Debian, please help! codeman1234 Linux - Software 1 04-28-2012 04:54 PM
9.3 weird behaviour ????? bigjohn Suse/Novell 9 07-06-2005 05:44 AM
[SOLVED] k3b weird behaviour filosophem Linux - Software 3 01-23-2005 04:42 PM
weird slit behaviour RaulConQ Linux - Software 7 10-31-2004 09:14 AM
Weird Apache behaviour ? zalmox Linux - Software 1 11-10-2003 08:12 AM


All times are GMT -5. The time now is 10:35 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration