Results 1 to 4 of 4

Thread: Question with SSH

  1. #1
    Join Date
    Jul 2006
    Posts
    64

    Question with SSH

    I use SSH to remote FreeBSD
    $ssh tom@xxxxxxxxxxxx
    password:

    Then I SSh to suspend client in that remote machine:
    $~
    /home/tom: Permission denied

    Permission denied? Why? How to do that?

  2. #2
    Join Date
    Jan 2006
    Posts
    3,792
    I don't think it's an escape code
    problem here. Instead, it seems you're trying to execute your
    home directory. :-)

    The $ sign seems to imply you're using the Bourne Shell. The
    same problem you described can be done using the C Shell:

    % ~
    /home/poly: Permission denied.

    When I try this in BASH, I get this:

    $ ~
    bash: /home/poly: is a directory

    Maybe

    % cd ~

    is what you indended to do?

  3. #3
    Join Date
    Dec 2007
    Posts
    1,599
    SSH (as with most protocols) does not pass the hostname around like HTTP does, so you can't do name-based resolution.

    To host two computers running SSH on a single public IP, you'll have to use a non-standard port for the 2nd machine (i.e. 2222) and forward that to Box2.

  4. #4
    Join Date
    Jan 2006
    Posts
    2,257
    What happened here is that you were trying to type an escape code into ssh -- eg. ~^Z (suspend) or ~. (quit)

    However, '~' is actually a fairly common character in normal usage, so ssh will pass it through to the remote login session unless you get the escape sequence exactly right. The ~ character must be the first thing on a new line, and it must be followed by one of the known key codes, which you can list by using the ~? escape during a ssh session.

    It seems that you typed something wrong: perhaps you managed to type ~~ which means your shell on the remote machine would receive the ~ character. This it would duely expand to be the path to your home directory. It then tried to execute that path, but directories are not executable, resulting in the 'permission denied' message.

    Cheers

Similar Threads

  1. Replies: 8
    Last Post: 27-01-2012, 01:14 PM
  2. PCI-E 2.0 Question
    By fochdion in forum Monitor & Video Cards
    Replies: 1
    Last Post: 26-08-2010, 08:59 PM
  3. VB.net question
    By Daren in forum Software Development
    Replies: 4
    Last Post: 12-03-2009, 05:40 PM
  4. .pst question
    By bac15 in forum Windows Software
    Replies: 2
    Last Post: 03-03-2009, 07:09 PM
  5. USB 3 Question
    By bigboy in forum Hardware Peripherals
    Replies: 3
    Last Post: 16-12-2008, 08:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,989,215.39378 seconds with 17 queries