Jump to content

Recommended Posts

Posted

(I typed "ssh" into the TCH knowledge base search engine and it didn't

find anything.)

 

When I ssh into my server, I end up at the virtual ROOT directory, not

my $HOME directory:

 

$ ssh server20.totalchoicehosting.com pwd

/

 

This isn't true of any other machine into which I use ssh - they all

put me in my $HOME directory. Not being in $HOME breaks all my "rsync"

scripts and ssh commands for updating my site remotely.

 

While I can rewrite all my rsync and ssh scripts to work around this, I

would like to inquire if there is a simple way to have my ssh connection

put me in my $HOME directory and not in the virtual (jailshell) ROOT.

 

I suspect the act of doing the chroot in the jailshell loses the

initial $HOME setting from the sshd login and I end up at the root of

the chroot and not in my $HOME directory.

 

If this is the problem, the simple fix I would suggest is to pass an

appropriate BASH_ENV to the jailshell in the environment, pointing to a

TCH profile file (inside the chroot jail) that does a simple "cd" to set

the $HOME. (Reference: the "INVOCATION" section of the bash man page.)

 

Is this the right place to post this? Should I send in a help desk ticket?

Posted

In the jailshell chroot environment /tmp is not writable by me (owned

bv root, no perms), which breaks many of my scripts. (I've never worked

on a machine with an unwritable /tmp.)

 

I'm not too familiar with how the chroot environment is set up; but,

perhaps the chroot /tmp could be made a symlink to my $HOME/tmp (which

I can write); or, simply add the missing permissions to /tmp ?

 

Failing either of these things, I can rewrite the scripts to use $TMP

and point $TMP at my own $HOME/tmp ...

Posted

Oh dear. I set you up in my "gaim" client; but, when I call up an IM window

and type in a message to you, gaim segfaults and drops a core file...

 

Plan B? Perhaps one of the other plug-ins is more stable?

 

AIM - idallen2

ICQ - 8313669

MSN - idallen@hotmail.com

Posted

Just to close off this thread in case anyone else using ssh stumbles across it:

 

Bill got back to me immediately about the ssh chroot "jailshell"

environment and explained that it was something of a work-in-progress

and that I had discovered some of its problems.

 

After reviewing my credentials and then making me pass six exams, three

character references, two bribes and one prayer to a lesser god, Bill

gave me a real shell prompt instead of the jailshell and everything is

fine now. :-)

Posted

I don't blame him, and in fact I'm very grateful for his caution. This is shared hosting after all, and not a good place for anyone running loose with too much access and not enough knowledge. You certainly seem to have the requisite knowledge, but I am glad that Bill grilled you good to make quadruple sure.

 

That being said, congratulations on your "parole."

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...