I login to a lot of Linux boxes, and I use ssh public keys to login. When I create a new account/server, I have to:
- copy over my ssh public key to the remote host
- login to the remote host
- put the public key in the authorized_keys file, set the permissions etc.
- delete the copy of the public key
I figured there ought to be an easier way to do this, and here it is:
cat .ssh/id_rsa.pub | ssh parijat@192.168.1.97 "mkdir -p ~/.ssh ; cat - >> ~/.ssh/authorized_keys ; chmod -R go-rwx ~/.ssh"
1 comments:
cheap wedding gowns,
discount bridal gowns,
China wedding dresses,
discount designer wedding dresses,
China wedding online store,
plus size wedding dresses,
cheap informal wedding dresses,
junior bridesmaid dresses,
cheap bridesmaid dresses,
maternity bridesmaid dresses,
discount flower girl gowns,
cheap prom dresses,
party dresses,
evening dresses,
mother of the bride dresses,
special occasion dresses,
cheap quinceanera dresses,
hot red wedding dresses
Post a Comment