VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: SSH log in but still in home directory  (Read 2853 times)

Andy Price

  • Packager
  • Vectorite
  • ****
  • Posts: 237
SSH log in but still in home directory
« on: April 08, 2010, 06:43:23 am »

Hi. Like flip city, I am experimenting with SSH, but struggling at the first stage. I have 2 VL6 Standard boxes (IBM1 and IBM6) on a wired home network, SSH running on both boxes (/etc/rc.d/rc.sshd start), username andy on both with same password, plus additional username ming on the second box. When I run <ssh andy@ibm6.home.org> from IBM1 I get the initial message about "The authenticity of host..." and then I enter the password and it seems to let me in. But my login stays as andy:$ and when I run <ls> I get the listing for my own PC (IBM1) and not the one I am remoting to. A second problem is that when I run <ssh ming@ibm6.home.org> it seems to want to connect but gets refused at the password stage. I've got a feeling I'm doing something stupid, any ideas?
Thanks
Andy
Logged

newt

  • Vectorian
  • ****
  • Posts: 1132
Re: SSH log in but still in home directory
« Reply #1 on: April 08, 2010, 08:00:00 am »

Well, to me, it sounds like everything's working correctly.  Are you certain that the file listing would look different from your IBM1 system to your IBM6 system?  In other words, if they would have the same file listing then they are going to look identical.  As a test, create a file in Andy's home directory on the IBM6 and name it similarly (IBM6.txt) and then do the same on the IBM1 (IBM1.txt), that way when you list the files you can tell which system you're looking at.

An ssh session is going to look nearly identical to a standard shell, however I do believe the prompt changes slightly, but I may be wrong.  In other words, even though it may _look_ to be the same system after establishing an ssh session, it probably is not.

On to your second problem: Are you ever prompted for ming's password when you attempt the connection?
Logged

Andy Price

  • Packager
  • Vectorite
  • ****
  • Posts: 237
Re: SSH log in but still in home directory
« Reply #2 on: April 08, 2010, 08:24:43 am »

Hi newt. It's weird but I'm definitely looking at my own pc and not the remote - my own home folder is full whereas the remote is essentially empty as it's a new installation I made for testing SSH. One other curious thing is that if I try to run a program such as thunderbird I get an error message related to the display, which suggests that the command is working on the remote pc but because the session isn't X over SSH it can't display. Regarding your second question about accessing ming's account, I do get asked for the password and then it gives me a permission denied message, even though I put in ming's password. Not sure if permission denied is to do with file permissions or passwords though.
Logged

Daniel

  • Packager
  • Vectorian
  • ****
  • Posts: 704
    • TuxToys - Packages for VectorLinux 6.0
Re: SSH log in but still in home directory
« Reply #3 on: April 08, 2010, 08:40:04 am »

If you are connecting to another Vector box, then when you successfully log in, it will show the "menu" of stuff that always comes up before the prompt whenever you open a terminal or run the bash executable. Have you changed any settings in the sshd_config (I think that's what it is) file? or is it just the default settings?
Logged
The following sentence is true. The previous sentence is false.

VL 6.0 SOHO KDE-Classic on 2.3 Ghz Dual-core AMD with 3 Gigs of RAM

rbistolfi

  • Packager
  • Vectorian
  • ****
  • Posts: 2314
Re: SSH log in but still in home directory
« Reply #4 on: April 08, 2010, 10:33:14 am »

How are the hostnames of your local and remote computers? Looks like the hostname could be resolving to your local box. Ssh can login to the same box where the the daemon is running without problems. Try connecting by IP instead hostnames, and try the -v flag for verbose mode. For example ssh -v andy@192.168.0.5 (change the ip to your remote IP).

HTH
Logged
"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!

Andy Price

  • Packager
  • Vectorite
  • ****
  • Posts: 237
Re: SSH log in but still in home directory
« Reply #5 on: April 09, 2010, 05:55:11 am »

Thanks all for the input. Specifying the ip address instead of the hostname gets me connected correctly. And now I can also log in as Ming. Next up is trying to run an X session...
Logged

MikeCindi

  • Tester
  • Vectorian
  • ****
  • Posts: 1075
Re: SSH log in but still in home directory
« Reply #6 on: April 09, 2010, 06:03:09 am »

Please continue to report your progress with this as it seems to be a common issue for others.
Logged
The plans of the diligent lead to profit...Pro. 21:5
 VL64 7.1                                     RLU 486143

flip city

  • Packager
  • Vectorite
  • ****
  • Posts: 340
  • Way Out In HyperSpace
Re: SSH log in but still in home directory
« Reply #7 on: April 12, 2010, 10:59:52 pm »

Hi. Like flip city, I am experimenting with SSH, but struggling at the first stage.
Thanks
Andy

FYI I have used openssh successfully. It takes a bit of adjusting to become familiar with the configurations but is essential for today's cyberworld. For a free shell account check out http://www.cjb.net/. It does slow your surfing speed down a bit, but is an acceptable compromise for peace of mind and privacy.

Andy Price

  • Packager
  • Vectorite
  • ****
  • Posts: 237
Re: SSH log in but still in home directory
« Reply #8 on: April 13, 2010, 04:40:33 am »

An update on using ssh with X apps. To get it to work I needed to edit and uncomment three lines in /etc/ssh/sshd_config on the remote machine so that they read:
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
After that the command ssh -X user@ipaddress allowed me to run mousepad, firefox etc over the connecton, though it was rather slow.

Flip city, what can you use that free shell account for? I have signed up for one, logged in ok and then... well, after doing an ls and a mkdir I logged out. Presumably there's more to it than that!
Andy
Logged

flip city

  • Packager
  • Vectorite
  • ****
  • Posts: 340
  • Way Out In HyperSpace
Re: SSH log in but still in home directory
« Reply #9 on: April 13, 2010, 09:32:50 am »


Flip city, what can you use that free shell account for? I have signed up for one, logged in ok and then... well, after doing an ls and a mkdir I logged out. Presumably there's more to it than that!
Andy

Here's a link http://www.cjb.net/shell.html that should answer most of your questions.