Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-01-2006, 08:54 PM   #1
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238

Rep: Reputation: 30
something wrong with my shell on ssh to remote system

Hi I am sure this is something simple and I can;t understand when or how it just started happening...

I used to ssh to my web server and upon logging in I could just go straight to work. (usually vi, cp, mv, chmod and stuff you know)

I would also often su and do the same.

Since adding keychain and ssh-agent and getting my login automated I found that I got errors about my TERM declaration when on the remote system.

In fact after doing an export command I could see that the terminal declaration was "gnome" and of course the remote system then wouldn't let me use vi...

stardotstar@helios:/var/www/phpBB2/images$ vi
vi: gnome: unknown terminal type
stardotstar@helios:/var/www/phpBB2/images$ export
declare -x HOME="/home/stardotstar"
declare -x LANG="en_US"
declare -x LANGUAGE="en_US:en_GB:en"
declare -x LOGNAME="stardotstar"
declare -x MAIL="/var/mail/stardotstar"
declare -x OLDPWD="/var/www/phpBB2/images/avatars"
declare -x PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
declare -x PWD="/var/www/phpBB2/images"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_CLIENT=" 59081 22"
declare -x SSH_CONNECTION=" 59081 22"
declare -x SSH_TTY="/dev/pts/0"
declare -x TERM="gnome"
declare -x TZ="Australia/Brisbane"
declare -x USER="stardotstar"
By doing a

declare -x TERM="vt100"

I got things working ok...

In the end I added this line to my root .bashrc and things are automated because when I su to root the new environment shell .bashrc gets called. But this obviously isn't happening with my normal user login.

So it seems that due to automating the login via keychain the shell session is being passed from the local machine directly into the session on the remote box and I wonder what else - other than VI and the need to redeclare the TERM - I should be doing - is there a way to call the local .bashrc automatically on login or have I missed the point anyway somehow?

Thanks guys


Last edited by stardotstar; 08-01-2006 at 08:55 PM.
Old 08-03-2006, 04:11 AM   #2
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238

Original Poster
Rep: Reputation: 30
anyone?> by way of bumping () I have found that because the .bashrc is called when i su I don't now have the prob after logging in as my normal user and then switching but how do I ensure that my bash profile is correct when I connect to the remote system but don't have to enter a login (because I am using keychain/ssh-agent?)



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
backing up files to a remote system using tar over ssh kaplan71 Linux - General 5 08-05-2011 07:40 AM
Automated execution of a command on a remote system via SSH GUIPenguin Linux - General 1 02-28-2006 11:23 PM
mounting local hard drive in a remote shell (SSH) noir911 Linux - General 1 06-24-2005 05:55 AM
Remote SSH login causing system shutdown stevey99 Linux - Networking 2 01-08-2005 03:14 PM
shutdown xserver via remote shell (ssh) ? timbaloo Linux - Newbie 1 07-07-2004 04:33 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:42 PM.

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