Add new comment

Want to support HowtoForge? Become a subscriber!
Submitted by stars (registered user) on Tue, 2010-12-28 12:54.

If your server1.example.com has sshd on different port than 22 eg. 1234 than You have to make additional changes on server backup.example.com:

Add extra line to /backup/.ssh/config: port 1234

You shoul also use ssh-copy-id -p 1234 -i ~/.ssh/id_rsa.pub root@server1.example.com instead of ssh-copy-id -i ~/.ssh/id_rsa.pub root@server1.example.com

 Sometimes obove doesnt work, so You have to edit by root file ssh-copy-id (located /usr/bin/ssh-copy-id) around line 41:

 { eval "$GET_ID" ; } | ssh -p 1234 $1 "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys" || exit 1

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.