#!/bin/bash
cat ~/.ssh/id_rsa.pub | ssh $1 'mkdir -p .ssh; cat >> .ssh/authorized_keys'
Programing, Shell scripting, Windows, Linux. I'm using this as a repository for all those niggling little tasks that get done just often enough to be annoying, but maybe not often enough to commit to memory, and other things I feel like writing about.
Showing posts with label shared keys. Show all posts
Showing posts with label shared keys. Show all posts
Monday, January 28, 2008
Setting up Remote SSH with shared keys
This little bit of code is quite nice. I put it in a file called setup_ssh in my ~/bin directory and life was much easier. Now when I want to setup shared key authentication i just type 'setup_ssh user@host' and put in my password. Thats it!
Subscribe to:
Posts (Atom)