Results 1 to 10 of 10

Thread: howe to make 1 prot work on ssh on ubuntu 10.04

  1. #1
    Join Date
    Oct 2012
    Beans
    8

    howe to make 1 prot work on ssh on ubuntu 10.04

    Hi

    I have Ubuntu 10.04 desktop and Ubuntu 10.04 Server

    Howe to make 1 prot to work on ssh on dekstop and server

    I replace the port ssh to new port , put all ip can connect to ssh in the new port

    i want make 1 ip connect the ssh port ?

    can any body help me ???

  2. #2
    Join Date
    Nov 2008
    Location
    Lleida, Spain
    Beans
    1,157
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: howe to make 1 prot work on ssh on ubuntu 10.04

    ssh user@ip -p portnumber

  3. #3
    Join Date
    Oct 2012
    Beans
    8

    Re: howe to make 1 prot work on ssh on ubuntu 10.04

    Quote Originally Posted by albandy View Post
    ssh user@ip -p portnumber

    thanks

    but , i want to make 1 ip only work on ssh ?

  4. #4
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: howe to make 1 prot work on ssh on ubuntu 10.04

    Can you explain in more detail what it is that you want to happen? What are you trying to do and how do you plan to use the connection?

  5. #5
    Join Date
    Oct 2012
    Beans
    8

    Re: howe to make 1 prot work on ssh on ubuntu 10.04

    Quote Originally Posted by Lars Noodén View Post
    Can you explain in more detail what it is that you want to happen? What are you trying to do and how do you plan to use the connection?

    I am open file etc/ssh/ssh_config

    and put line

    LineAddress : 62.135.119.50

    and restart the ssh

    i cant work to ssh for any ip

    whe i delte it , it work for any ip on ssh

    I want make security for ssh , to work for my ip only ??

  6. #6
    Join Date
    Nov 2008
    Location
    Lleida, Spain
    Beans
    1,157
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: howe to make 1 prot work on ssh on ubuntu 10.04

    Quote Originally Posted by rzeer View Post
    I am open file etc/ssh/ssh_config

    and put line

    LineAddress : 62.135.119.50

    and restart the ssh

    i cant work to ssh for any ip

    whe i delte it , it work for any ip on ssh

    I want make security for ssh , to work for my ip only ??

    You can use ubuntu firewall to control this in an easy way:

    sudo ufw enable (this enables ubuntu firewall)
    sudo ufw allow from 62.135.119.50 proto tcp to any port 22

  7. #7
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    match address

    There is no 'LineAddress' in sshd_config. What you are probably looking for is Match Address in sshd_config.

    Code:
    Match Address *,!62.135.119.50
      ForceCommand /bin/false
    
    Match Address 62.135.119.50

    You could also use iptables or xinetd to restrict which address you are allowed to connect from. Myself, I'd lean towards using iptables as described in albandy's post with UFW.

  8. #8
    Join Date
    Oct 2012
    Beans
    8

    Re: howe to make 1 prot work on ssh on ubuntu 10.04

    Quote Originally Posted by albandy View Post
    You can use ubuntu firewall to control this in an easy way:

    sudo ufw enable (this enables ubuntu firewall)
    sudo ufw allow from 62.135.119.50 proto tcp to any port 22

    thanks , and plz help me

    for ssh want to work for my ip only , and howe to make it on ssh_config

    for another 2 port want to work for my ip only

    for some port want to work for any ip ?

    can you help me plz ?

  9. #9
    Join Date
    Oct 2012
    Beans
    8

    Re: match address

    Quote Originally Posted by Lars Noodén View Post
    There is no 'LineAddress' in sshd_config. What you are probably looking for is Match Address in sshd_config.

    Code:
    Match Address *,!62.135.119.50
      ForceCommand /bin/false
     
    Match Address 62.135.119.50

    You could also use iptables or xinetd to restrict which address you are allowed to connect from. Myself, I'd lean towards using iptables as described in albandy's post with UFW.

    thanks , and plz help me

    for ssh want to work for my ip only , and howe to make it on ssh_config

    for another 2 port want to work for my ip only

    for some port want to work for any ip ?

    can you help me plz ?

  10. #10
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: howe to make 1 prot work on ssh on ubuntu 10.04

    The restrictions don't come from ssh_config, so leave that be. The restrictions can only be made on the server side. That means using UFW as recommended above in albandy's post.

    https://help.ubuntu.com/12.04/serverguide/firewall.html
    https://help.ubuntu.com/community/UFW

    To have sshd listen on additional ports, if that is what you are asking, you have to configure it in sshd_config using the ListenAddress directive, and then open the ports in UFW as described in the two links above.


    Code:
    ListenAddress 0.0.0.0:22
    ListenAddress 0.0.0.0:2022
    ListenAddress 0.0.0.0:3118

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
  •