Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Seeking help with ssh-server set up

  1. #1
    Join Date
    Jan 2007
    Beans
    439

    Seeking help with ssh-server set up

    I am running a desktop with Kubuntu 18.04.05 LTS. I have been using dropbox to share pdf files with an ipad for several years. This just recently stopped working. In searching the internet for a work around, it seems that using openssh-server on the linix desktop and FE File Explorer on the ipad might be a good solution. So far I have not been able to make it work. I suspect that the problem is the openssh-server set up on the desktop. I may have messed up some of the "script" for openssh-server while attempting to configure. I tried to uninstall and reinstall openssh-server, but the questionable code remains. I would greatly appreciate some input from some kind soul with knowledge of these things.
    Last edited by paydaydaddy; June 12th, 2021 at 06:59 PM.
    Nothing is really clear when you are obtuse.

  2. #2
    Join Date
    Jun 2016
    Beans
    2,831
    Distro
    Xubuntu

    Re: Seeking help with ssh-server set up

    Quote Originally Posted by paydaydaddy View Post
    So far I have not been able to make it work.
    What exactly does happen when you try to ssh in?

    Few things to check:
    • Are both your iPad and your computer on the same LAN?
    • Do you have a firewall on your computer that is blocking the connection?
    • What changes, if any, did you make to your /etc/ssh/sshd_config ?
    • As a test, can you ssh into the computer from itself at 127.0.0.1?
    Xubuntu 22.04, ArchLinux ♦ System76 hardware, virt-manager/KVM, VirtualBox
    When your questions are resolved to your satisfaction, please use Thread Tools > "Mark this thread as solved..."

  3. #3
    Join Date
    Jan 2007
    Beans
    439

    Re: Seeking help with ssh-server set up

    Please understand that I am ignorant of much of this. The ipad and the desktop are on the same LAN, I think. I just replaced my router last week. The desktop is hard wired, the ipad is wireless. I have taken steps see that the firewall, if active, is open to communicate on the correct port. I think I was finally able to purge and re-install openssh and all related files. I read about testing by sshing the computer into itself, but I lack the knowledge to do so.
    Nothing is really clear when you are obtuse.

  4. #4
    Join Date
    Jun 2016
    Beans
    2,831
    Distro
    Xubuntu

    Re: Seeking help with ssh-server set up

    Quote Originally Posted by paydaydaddy View Post
    I read about testing by sshing the computer into itself, but I lack the knowledge to do so.
    Just open Terminal and run
    Code:
    ssh -p <your_port> <your_username>@127.0.0.1
    Replace <your_port> and <your_username> with that information for your system. If your port is 22 you don't need to explicitly have the -p 22 in the command.
    Xubuntu 22.04, ArchLinux ♦ System76 hardware, virt-manager/KVM, VirtualBox
    When your questions are resolved to your satisfaction, please use Thread Tools > "Mark this thread as solved..."

  5. #5
    Join Date
    Jan 2007
    Beans
    439

    Re: Seeking help with ssh-server set up

    Interesting. It seemed as though the computer was going to log into it'self, and then access was denied due to invalid password. There is only one password to this computer that I am aware of.
    Nothing is really clear when you are obtuse.

  6. #6
    Join Date
    Jan 2007
    Beans
    439

    Re: Seeking help with ssh-server set up

    Have done lots of reading and have gained only a tiny bit of understanding. The written tutorials are pretty much beyond what my limited knowledge allows me to do with any level of confidence. Halogen2's help has convinced me that I need to configure either openssh-server or client, or both. I was able to save one of the default configs as a text file, but don't know what to do with it. No wonder guis have become so popular. Any suggestions other that invest in win10?
    Nothing is really clear when you are obtuse.

  7. #7
    Join Date
    Jun 2016
    Beans
    2,831
    Distro
    Xubuntu

    Re: Seeking help with ssh-server set up

    Quote Originally Posted by paydaydaddy View Post
    Interesting. It seemed as though the computer was going to log into it'self, and then access was denied due to invalid password. There is only one password to this computer that I am aware of.
    Sorry for the stupid question, but you are sure you typed it right?

    If so can you try putting an AllowUsers directive in /etc/ssh/sshd_config for your username (and then do sudo systemctl restart sshd to load the changes)? (This will specify that only your username is allowed to connect over ssh. Refer to man sshd_config for more info.)

    I'm not sure how to help further if that doesn't work, but adding one or more -v arguments to the ssh command might provide some useful information for someone who knows this more than me.
    Xubuntu 22.04, ArchLinux ♦ System76 hardware, virt-manager/KVM, VirtualBox
    When your questions are resolved to your satisfaction, please use Thread Tools > "Mark this thread as solved..."

  8. #8
    Join Date
    Jan 2007
    Beans
    439

    Re: Seeking help with ssh-server set up

    I have read that a root password is needed in addition to the user login password. Do you think this is good information?
    Nothing is really clear when you are obtuse.

  9. #9
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Seeking help with ssh-server set up

    ssh-server is one of the easiest things to get working. The defaults "just work" and are secure enough for use on a LAN.

    Let's reset everything back to the beginning:
    Code:
    sudo apt purge openssh-server
    That will remove any prior config settings in /etc/ssh/ which is what you want.

    Next, let's install a fresh ssh and some minimal brute-force prevention.
    Code:
    sudo apt install ssh fail2ban
    That's it on the server. "ssh" is a meta package that includes both the ssh server and ssh client. You want both on every Linux system.

    If you have a firewall enabled, you'll need to open the 22/tcp port. If not, nothing extra need be done. You have ssh-server, sftp-server, scp and all the expected ssh tools now.

    On any client system that is on the same LAN, run
    Code:
    ssh {userid}@{server-IP}
    So, the userid is optional, if the local username and remote username are identical. It is always safe to specify.
    Code:
    ssh thefu@172.22.22.4
    is what the command would look like on my client to connect to the .4 IP on my LAN. A password prompt will be displayed. Enter the correct password, and I'm in. That's it. Nothing more to this.

    If the connect doesn't work, then either the connection is being blocked on the network somewhere or you don't know the correct password for that userid. If you've screwed with tcp-wrappers or firewalls, all bets are off. We won't be able to help you figure those out since there are thousands of things that could have been modified which screw up connections. But because this happens so often, I've written an ssh-troubleshooting guide: https://blog.jdpfu.com/2015/08/17/tr...sh-connections
    Hope that is helpful.

    Sorry, I can't help with anything related to Apple. Had an Apple machine for 3 weeks and it drove me crazy.

  10. #10
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Seeking help with ssh-server set up

    Quote Originally Posted by paydaydaddy View Post
    I have read that a root password is needed in addition to the user login password. Do you think this is good information?
    NO!!!!!! Ubuntu doesn't have a root password and you don't need it. That is bad information. In fact, attempting to ssh into an Ubuntu system using root shouldn't be allowed by default. It is a bad security practice.

    BTW, using passwords for access is a bad security practice. For ssh, we usually use ssh-keys for authentication. Until you get the connection working, we won't go there.

Page 1 of 2 12 LastLast

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
  •