How to open SSH Server

Discussion in 'Command Line' started by bashcommando, Jul 29, 2014.

  1. bashcommando

    bashcommando Active Member

    Messages:
    217
    Likes Received:
    43
    Trophy Points:
    28
    Code:
    apt-get install openssh-server openssh-client
    service ssh start
    If something doesn't work put sudo before it like
    Code:
    sudo apt-get install openssh-server openssh-client
    sudo service ssh start
    If that still doesn't work then
    Code:
    logout
    root
    [root's password here]
    apt-get install openssh-server
    service ssh start
    If for some reason ssh doesn't work then attempt to create a dsa key
    To secure that key type
    Code:
    chmod 600 [Name of key]


  2. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,398
    Likes Received:
    454
    Trophy Points:
    83
    when you install openssh-server the service is started automatically.
  3. bashcommando

    bashcommando Active Member

    Messages:
    217
    Likes Received:
    43
    Trophy Points:
    28
    Good note
  4. WharfRat

    WharfRat Member

    Messages:
    35
    Likes Received:
    11
    Trophy Points:
    8
    You can log into your ip address to test it

    Code:
    ssh -YC yourname@192.168.1.105
    Get your ip from

    Code:
    ifconfig
  5. bashcommando

    bashcommando Active Member

    Messages:
    217
    Likes Received:
    43
    Trophy Points:
    28
    Again very useful but what does -YC do?
  6. WharfRat

    WharfRat Member

    Messages:
    35
    Likes Received:
    11
    Trophy Points:
    8
    Let me introduce you to

    Code:
    man ssh
    icehouse15 likes this.
  7. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,398
    Likes Received:
    454
    Trophy Points:
    83
    Code:
    -Y    Enables trusted X11 forwarding.  Trusted X11 forwardings are not
                  subjected to the X11 SECURITY extension controls.
    Code:
          -C    Requests  compression  of  all  data  (including  stdin, stdout,
                  stderr, and data for forwarded X11 and  TCP  connections).  The
                  compression  algorithm  is  the  same  used  by gzip(1), and the
                  ``level'' can be controlled by the CompressionLevel  option  for
                  protocol version 1.  Compression is desirable on modem lines and
                  other slow connections, but will only slow down things  on  fast
                  networks.  The default value can be set on a host-by-host basis
                  in the configuration files; see the Compression option.
    
  8. bashcommando

    bashcommando Active Member

    Messages:
    217
    Likes Received:
    43
    Trophy Points:
    28
    So using -Y is like a remote desktop?
  9. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,398
    Likes Received:
    454
    Trophy Points:
    83
    not really. It merely disables any kind of X11 security when streaming X over ssh. You still have to setup remote desktop. It is used in conjunction with it.
  10. bashcommando

    bashcommando Active Member

    Messages:
    217
    Likes Received:
    43
    Trophy Points:
    28
    Cool. You really do learn something every day!
    ryanvade likes this.
  11. jerz4lunch

    jerz4lunch New Member

    Messages:
    21
    Likes Received:
    6
    Trophy Points:
    3
    To install and enable on Arch Linux:
    Code:
    # pacman -S openssh
    # systemctl start sshd
    # systemctl enable sshd
    Or using sudo:
    Code:
    $ sudo pacman -S openssh
    $ sudo systemctl start sshd
    $ sudo systemctl enable sshd

Share This Page