Page 3 of 3 FirstFirst 123
Results 21 to 27 of 27

Thread: Can I tell Rsync to wait longer for a password when connecting to a remote system?

  1. #21
    Join Date
    May 2018
    Location
    Here and There
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Can I tell Rsync to wait longer for a password when connecting to a remote system

    Quote Originally Posted by goemonburo View Post
    But does anyone out there know what I need to do to fix a "Permission denied" error?
    Alternatively, does anyone know how I can extend the ssh login time to something like...two hours? Either of those will easily answer my question.
    I'll give it my best shot, I too ran into this about 8 months ago on 24.04 Devel.
    I first checked in
    Code:
    ls -l .ssh
    The private key should have read and write permissions only for the user and no other permissions for the group and others. Mine did not.
    My fix was:
    Code:
    chmod 600 ~/.ssh/id_rsa
    Also the public key shouldn’t have write and execute permissions for group and others. So My change:
    Code:
    chmod 644 ~/.ssh/id_rsa.pub
    Now that I have the correct permissions, I can connect to ssh again. At this time, "it will ask your admin password" to unlock the keys.

    EDIT: Going through my notes, it wouldn't hurt to check your /home permissions as well mine were changed to "777" and that's No Good.
    Code:
    stat /home/$USER
      File: /home/me
      Size: 82            Blocks: 66         IO Block: 16384  directory
    Device: 0,56    Inode: 2           Links: 33
    Access: (0750/drwxr-x---)  Uid: ( 1000/      me)   Gid: ( 1000/      me)
    Access: 2024-09-06 11:34:07.682570266 -0600
    Modify: 2024-09-06 11:34:07.410573686 -0600
    Change: 2024-09-06 11:34:07.410573686 -0600
     Birth: 2024-07-16 18:03:58.252613387 -0600
    Code:
    stat .ssh
      File: .ssh
      Size: 3             Blocks: 2          IO Block: 512    directory
    Device: 0,56    Inode: 128         Links: 2
    Access: (0700/drwx------)  Uid: ( 1000/      me)   Gid: ( 1000/      me)
    Access: 2024-09-06 11:37:55.975362466 -0600
    Modify: 2024-07-16 18:04:11.492446940 -0600
    Change: 2024-07-26 10:21:32.447868621 -0600
     Birth: 2024-07-16 18:04:11.491446952 -0600
    Last edited by 1fallen2; 4 Weeks Ago at 07:11 PM. Reason: add to

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

    Re: Can I tell Rsync to wait longer for a password when connecting to a remote system

    You are correct. I know of no way to solve the issue reported initially. The solution to that is to use ssh keys so you are never prompted for a password for this specific task. Everything after that is an "implementation detail" for your specific situation.

    I understand why you can feel like I'm offering a Lamborghini. You have a broken scooter with a key. What we initially suggested was a scooter with keyless start. In thinking through that solution, other details (user1/user2) were offered which made it a two scooter with keyless starting problem. Soon, other details were offered which pointed out that using 1-user backup solutions would be less great to using a system-wide backup solution. It is still a scooter, just with n+1 seats. Heck, even my backups aren't a Lamborghini. I use only F/LOSS tools. If I had a Lamborghini, I'd be using an expensive, commercial, backup tool like Netbackup (is that even sold anymore?).

    The 2-seat, keyless start for rsync is adding more and more complexities. I get that you don't feel like 2-seats are needed, but they are to address the permissions problem, IMHO. At restore time, there will be problems with the method being used. At least I think there will. I ran into similar issues 20+ yrs ago when I used rsync for backups too.

    I'll leave it to others to try to explain things differently. Hopefully they will be clearer than I. Obviously, it is my failure. Sorry.

  3. #23
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    3,565
    Distro
    Ubuntu Development Release

    Re: Can I tell Rsync to wait longer for a password when connecting to a remote system

    Quote Originally Posted by goemonburo View Post
    Alternatively, does anyone know how I can extend the ssh login time to something like...two hours? Either of those will easily answer my question.
    ??? I did in earlier replies. I also tested it and it worked fine. I tested having rsync waiting for about 11 hours when I had a 1 day timeout set. See my earlier post.
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  4. #24
    Join Date
    Mar 2008
    Beans
    244

    Re: Can I tell Rsync to wait longer for a password when connecting to a remote system

    Thank you @TheFu, this post (above) made me chuckle. Yes. It's more than just a scooter. #facepalm.

    Thank you for your help and your humor. Nobody has failed; no apologies needed. I really genuinely appreciate the help and you kindly did what you could.

  5. #25
    Join Date
    Mar 2008
    Beans
    244

    Re: Can I tell Rsync to wait longer for a password when connecting to a remote system

    @Doug S, I have no idea how I missed this, I am so sorry. Let me try this and get back to you. Thank you for posting!! This is probably exactly what I need. (Though I now need to figure out how to revoke the passwordless login....or to force a password in this case....)

  6. #26
    Join Date
    Mar 2008
    Beans
    244

    Re: Can I tell Rsync to wait longer for a password when connecting to a remote system

    Hey guys, I have to BEG for help here, as I've now left the country and it appears something in the setup for the above has now turned OFF any kind of password-enter option for SSH. I'm unable to connect via my computer OR phone, as they don't have keys and it seems to just accept keys now. There's no 2nd option or backup that prompts for a password. I will keep going with his when I get back from my business trip but could someone tell me if a) I can pass a key pair to the system remotely at this point (being totally, apparently, locked out) or alternatively, can I possibly rename the .ssh file as .ssh-old by getting a buddy to go to my house, sit at the actual machine, and dutifully copy the ssh terminal commands that will let him do that so I can return to a password-entry option while abroad?

    I didn't realize that what I was doing was setting my system up to ONLY accept keys.

    Any help greatly appreciated, as I need to access this computer via a ssh tunnel and am thus far unable to do so.

    Thank you in advance!!

  7. #27
    Join Date
    Feb 2019
    Location
    Virginia
    Beans
    393
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Can I tell Rsync to wait longer for a password when connecting to a remote system

    It sounds like you are now asking about opening up your SSH to the internet. In my opinion, Key based authentication is a must for this use. I mean, it is possible to open up your SSH to the Internet, using password only access, but not usually recommended.

    The authentication method you choose is defined in the sshd_config on the server. This is set up & tested before you leave home.

    To be honest, I thought we were talking about rsync & SSH timeout. A user provided you a solution to extend that time out, but you haven’t reported on that.

    You can turn off key based auth in the sshd_config file on the server, and you can turn on password authentication in that same file. If key based authentication is turned off, then SSH will not look for keys. Furthermore, if password auth is turned on, then SSH will ask for & look for the password used to authenticate the first time between these hosts.

    There are lots of examples you can find online how to configure your sshd_config file within the context of the type of SSH session you are requesting. I use a VPN for remote access from the Internet, but I know a lot of folks do use SSH tunneling, but my guess is 99% of them use key based authentication.
    Last edited by aljames2; 4 Weeks Ago at 12:11 AM. Reason: Spelling

Page 3 of 3 FirstFirst 123

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
  •