[ale] Ssh config question
DJ-Pfulio
DJPfulio at jdpfu.com
Fri Feb 13 14:09:52 EST 2015
Looks like the ALE mail server is running a day or 2 behind again. ;(
The ~/.ssh/config file is just for remembering stuff - it doesn't actually
change any server-side settings. That is in /etc/ssh/sshd_config - Port.
If you didn't place the public key on the remote machine under each userids
HOME, then it won't work.
Since it is a best practice to refuse remote root connections, I setup
root-equiv accounts with key-only access for backup use. But when using tar,
that isn't really needed - the archive will have the own/group/permissions
inside already.
Lastly, I'd only use tar for very small directories, not for whole system backups.
Hopefully this all makes sense.
On 02/12/2015 10:09 AM, Jim Lynch wrote:
> I have a backup being run on a system that then uses scp to copy the archive to
> another system. The backup is running on system A as root and copies to system
> B as a normal user, e. g. scp backup.tar normal at B.example.com. In my
> /root/.ssh/config file I have
>
> Host B.example.com
> Port 2222
>
> I did a ssh-copy-id normal at B.example.com AND
> ssh-copy-id B.example.com
>
> So ssh works fine to root at B.example.com but not to normal at B.example.com
>
> If I change the ssh port back to 22 it works as advertised, connecting to
> either, but it won't connect to another user on B.example.com with an alternate
> port. In the man page for .ssh/config there is a User key word but I'm guessing
> that would force all connections to the host to use that user.
>
> Other than putting the port number on the command is there a way around this
> problem?
> scp -P 2222 backup.tar normal at B.example.com works.
>
> Thanks,
> Jim.
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
--
Got Linux? Used on smartphones, tablets, desktop computers, media centers, and
servers by kids, Moms, Dads, grandparents and IT professionals.
More information about the Ale
mailing list