situation: one is userA but wants to ssh login to server with ipv4: 123.123.123.123 via userB (dedicated user for that server/task).

so what one does is:

  • make sure one can login as userB

than as userA:

userA: ssh -v -i /home/userB/.ssh/id_rsa userB@123.123.123.123

one will be asked for the passphrase of the ssh-key of userB and voila!

logged in! 🙂

this also works with scp: (uploading files as root from crontab as different user)

scp -v -i /home/user/.ssh/id_rsa /file/to/upload.txt user@192.168.0.123:/upload/path/

PS: REALLY REALLY LOVE OPENSSH! GREAT JOB ALL INVOLVED! 🙂

it’s usefull for SOOOO many things not only:

  • remote administration of servers
  • secure file-transfer / rsyncing files
  • vpn like: tunneling ports and traffic

linux bash – config ssh to allow only login from specific users@specific-hosts – sshd AllowUsers

cool stuff you can do with ssh

linux ssh – generate public private keys

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin