Results 1 to 10 of 10

Thread: ssh

  1. #1
    Join Date
    Sep 2013
    Beans
    20

    ssh

    What is the ssh command mode when you connect to a server?
    Where is the directory you are?
    What is the command to get it out?
    Last edited by sandyd; October 3rd, 2013 at 07:39 PM. Reason: fixed wording

  2. #2
    Join Date
    Nov 2007
    Beans
    2

    Re: ssh

    'pwd' will display the name of the current working directory.

    I'm not understanding the first and third question.

  3. #3
    Join Date
    Sep 2006
    Beans
    7,804
    Distro
    Lubuntu Development Release

    Re: ssh

    When you connect to a server with ssh, you will get your regular login shell as it is configured on your server. When your session starts you will be in your home directory on the server, whatever that is set to be. See pwd above.

    To end your ssh session with the server you can just close the terminal window or else type exit or on a new line enter ~.

  4. #4
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: ssh

    Quote Originally Posted by Lars Noodén View Post
    or on a new line enter ~.
    Does that only work with specific terminal programs? I tried it via putty and it just spit back:

    Code:
    charles@Thor:~$ ~
    -bash: /home/charles: Is a directory
    charles@Thor:~$ ~.
    -bash: ~.: command not found
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  5. #5
    Join Date
    Nov 2008
    Location
    Storybrooke
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: ssh

    Quote Originally Posted by CharlesA View Post
    Does that only work with specific terminal programs? I tried it via putty and it just spit back:

    Code:
    charles@Thor:~$ ~
    -bash: /home/charles: Is a directory
    charles@Thor:~$ ~.
    -bash: ~.: command not found
    works here with ssh
    Ubuntu Forums Moderation Staff
    Okay then. We're relying on mirror dust and fairies but now we have a plan which is progress - Emma

  6. #6
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: ssh

    Quote Originally Posted by sandyd View Post
    works here with ssh
    Thanks. Guess it's a Linux thing then.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  7. #7
    Join Date
    Jan 2013
    Location
    Norrkoping, Sweden
    Beans
    149
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: ssh

    If I understood the question correct, you want to know how to connect to a server with ssh? You wanna know what directory you end up in? and how to get out.

    1 You connect to a server trough a terminal, if you are in Linux. Press ctrl+alt+T and type
    Code:
    ssh username@server
    Give your password and press enter.
    2 To see what directory you ended up in, type
    Code:
     pwd.
    3 To get out and leave the server, type
    Code:
    exit
    What ya need my signature for? It's not like it's my last will, or something!

  8. #8
    Join Date
    Sep 2006
    Beans
    7,804
    Distro
    Lubuntu Development Release

    ~.

    Quote Originally Posted by CharlesA View Post
    Thanks. Guess it's a Linux thing then.
    It should be an ssh client thing, but maybe only with the regular ssh client. PuTTY is a different animal. If you look in the manual page for ssh(1) in the section "escape characters" or press ~? you should see the full list. You can add or remove port forwarding and levels of verbosity that way too.

  9. #9
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: ~.

    Quote Originally Posted by Lars Noodén View Post
    It should be an ssh client thing, but maybe only with the regular ssh client. PuTTY is a different animal. If you look in the manual page for ssh(1) in the section "escape characters" or press ~? you should see the full list. You can add or remove port forwarding and levels of verbosity that way too.
    Ah, cool. Thanks for the info!
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  10. #10
    Join Date
    May 2012
    Beans
    248
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: ssh

    ctrl+d will exit too.

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
  •