From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.62) (envelope-from <gentoo-user+bounces-66225-garchives=archives.gentoo.org@gentoo.org>) id 1I6Xw8-0003rO-QF for garchives@archives.gentoo.org; Thu, 05 Jul 2007 20:28:25 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l65KR6dF005381; Thu, 5 Jul 2007 20:27:06 GMT Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l65KMpfp000552 for <gentoo-user@lists.gentoo.org>; Thu, 5 Jul 2007 20:22:51 GMT Received: by py-out-1112.google.com with SMTP id d32so5546945pye for <gentoo-user@lists.gentoo.org>; Thu, 05 Jul 2007 13:22:51 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=agWUh2gDazD6a74lqrLBmFpo1IDifq6+r+ZYP7cTi/QdHZwH1u5PcoWzFtc15ldP/bEaPxK0pli2jwZ6H9v3qOzHka02nty/c5c+1SudKQTa++8wowl/jnON0zVIh6AxxmbEHB404hw0W+5R0ImZ6OKYUDy+lov9Fsaj+Xfdmlc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=W67ycz14ODt/7HtJmDnF5cv1cT4v0GWk2ykVilDbE4avsTMUd8mkYStttWgOgRCZBpfsFvB0GDyJy8Fvs8wl5mEHOz2v5zHUrqhCFxIXnXZFjLd7ijvK+gTorn7nJZiV6esntMkw+tnjQWdOM0FL1GCQyjuehcEVzbL4M/gijYI= Received: by 10.65.211.16 with SMTP id n16mr15251627qbq.1183666970698; Thu, 05 Jul 2007 13:22:50 -0700 (PDT) Received: by 10.64.251.15 with HTTP; Thu, 5 Jul 2007 13:22:50 -0700 (PDT) Message-ID: <8cd1ed20707051322u25305959m6179268fa7a29c14@mail.gmail.com> Date: Fri, 6 Jul 2007 08:22:50 +1200 From: "Kent Fredric" <kentfredric@gmail.com> To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] [OT] Storing ssh and gpg keys in USB flash drives In-Reply-To: <897b7c080707050342t143c704l8f75321ee5b7529b@mail.gmail.com> Precedence: bulk List-Post: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <897b7c080707050342t143c704l8f75321ee5b7529b@mail.gmail.com> X-Archives-Salt: 6625f7f2-f370-4f19-afb1-c30bca11e763 X-Archives-Hash: 4e83e2bff3557abf7ec41db86d3ceefb On 7/5/07, Jos=E9 Gonz=E1lez G=F3mez <jgonzalez.openinput@gmail.com> wrote: > Hi there, > > I would like to store my ssh and gpg keys in my usb flash drive, but I'm = not > sure what's the best way to do it: > > If I use vfat so I can also read them from Windows I have two problems: > first you must mount your USB key with a 0077 umask, so ssh and gpg doesn= 't > complain about key permissions; latest KDE version seems to auto mount US= B > flash drives using pmount with a 0022 umask and I haven't been able to > change this, so I either mount it manually or change the permissions afte= r > being mounted. The second problem is related to gpg: it seems that gpg us= es > links to lock the keyrings, and vfat doesn't support them, so I'm able to > read keys, but not to make any modfication on them. > > If I use ext2 the permission problem goes away (kind of), but I have the > feeling that this isn't as portable as vfat, as the filesystem uses the u= ser > id to control access to files, and pluging the drive in another system wh= ere > my user may have anoter uid leads me to chowning/chmoding in the better c= ase > or not having access to my keys in the worst case. > > Any ideas? > > Best regards > Jose > vfat{ vfatfiles ext2fs{ gpg_stuff } } 1. Mount vfat drive 2. dd if=3D/dev/full bs=3D1048580 count=3D4096 of =3D/mountpoint/mynewextfi= le 3. mkfs.ext2 /mountpoin/mynewextfile 4. mount /mountpoint/mynewextfile/ /someothermountpoint/ 5. cp files to /someothermountpoint/ 6. use /someothermountpoint/ 7. umount /someothermountpoint/ 8. umount /mountpoint/ I didn't say it would be pretty, but that is a handy trick to have up the s= leve. that would make a 4 Meg file containing a filesystem to hold your files, just like a TAR file, except with all the features of ext2 and no need unpack it to use. You can do anything with linux, really. Yes. even format a file as a filesystem and mount it ( a word of warning : dont do this and format with reiserfs and then store that file on a reiserfs fs ... if you do, next time you need to --rebuild-tree reiser will try to be smart and trash your drive :) ... learn't the hard way ) --=20 Kent ruby -e '[1, 2, 4, 7, 0, 9, 5, 8, 3, 10, 11, 6, 12, 13].each{|x| print "enNOSPicAMreil kdrtf@gma.com"[(2*x)..(2*x+1)]}' -- gentoo-user@gentoo.org mailing list