Debian Lenny: How password-less SSH root login?

Discussion in 'Server Operation' started by edge, Oct 2, 2010.

  1. edge

    edge Active Member Moderator

    I'm trying to setup a backup script that needs a password-less SSH root login to the server that needs to be backuped.

    Both servers are running Debian Lenny.
    The server than needs to be backuped does not allow a direct root login (to get root you need to login with a normal account and su / root password)

    Is it possible to get a password-less SSH root login (with a key file?) even when root login is disabled, and if so, how can this be done?
     
  2. Hans

    Hans Moderator ISPConfig Developer

    Hi Edge,

    How that can be done is written here at step 3.

    As root access is dangerous, please set bantime and maxretry to strict values within your fail2ban config file.
    (jail.conf /local.conf)
     
    Last edited: Oct 3, 2010
  3. Franz

    Franz Member

  4. edge

    edge Active Member Moderator

    Thats what I tried, but like the other poster "cat /tmp/id_dsa.pub >> ~/.ssh/authorized_keys2" is giving me an error “bash: /.ssh/authorized_keys2: No such file or directory”.
     
  5. Franz

    Franz Member

    check if .ssh directory exist

    Code:
    ls -la ~
    if not
    Code:
    mkdir ~/.ssh 
    chmod 700 ~/.ssh
    cat /tmp/id_dsa.pub >> ~/.ssh/authorized_keys2
    
     

Share This Page