LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 12-20-2013, 09:53 AM   #1
kusanagiyang
LQ Newbie
 
Registered: Nov 2009
Posts: 25

Rep: Reputation: 1
putty shell is different from logging on from console !?


Hello friends,

I just became aware of this matter a few moments ago. I usually manage this Linux box of mine with ssh in putty. For no reason, I happened to logon from console today. To my amazement, the console said "command not found" when I tried to use ssh. Then, I use ssh in putty to connect to this box, and "which ssh" then found it.
I thought the console and ssh in putty are the same thing (shell), but obviously they are not. Do you know how they differ ? Thanks~~
 
Old 12-20-2013, 10:02 AM   #2
nd7rmn8
Member
 
Registered: Jan 2013
Distribution: Arch
Posts: 50

Rep: Reputation: 13
If you are logging in as the same user, they are the same. Perhaps you are logging in as a different user.
 
Old 12-21-2013, 01:18 AM   #3
kusanagiyang
LQ Newbie
 
Registered: Nov 2009
Posts: 25

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by nd7rmn8 View Post
If you are logging in as the same user, they are the same. Perhaps you are logging in as a different user.
I used "root" for both....
 
Old 12-21-2013, 10:30 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,919

Rep: Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689
Quote:
Originally Posted by kusanagiyang View Post
I used "root" for both....
First, logging in as root is a VERY BAD IDEA. There is NO REASON to do this, ever, unless you're in single-user mode. Otherwise, using sudo (or even an su - ) is the best way.

That said, you need to look in your /etc/profile...there are definitions for the 'console' vs. xterms that set different variables.
 
Old 12-21-2013, 12:30 PM   #5
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
As far as I understood your question, on one side you're trying to connect to a Linux system thru ssh using putty appliication, while on the other side, you're invoking ssh cmd (from an another Linux system's console) to connect to that Linux box... Right?

If this is the case, then note that both works differently. Possibly, ssh cmd is missing in your path variable when trying it in console. And as you said that you found ssh using which ssh then you should add it's absolute path in your path variable (under /etc/profile or /etc/.bashrc file).

However, provide result of following cmds:
Code:
~$ which ssh
~$ echo $PATH

Last edited by shivaa; 12-22-2013 at 04:34 AM. Reason: Typo
 
  


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
is there a better console than putty fachhoch@gmail.com General 2 10-06-2011 05:24 PM
How to send Fn (F1,F2) over Serial console theu PuTTY dgonzalezh Linux - Newbie 2 08-26-2011 10:00 PM
Logging into Linux sshd server from Windows using Putty via a script. nirmal.mukundan General 2 02-14-2011 07:58 PM
How do I determine the Linux Server Version using a console (puTTY)? adichosa Linux - Newbie 3 10-25-2008 10:39 AM
Logging in via putty ssh ... no luck Bockwurst Linux - Networking 5 05-05-2004 10:37 AM


All times are GMT -5. The time now is 01:46 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration