Date: Wed, 11 Oct 2006 00:22:52 +0200 From: martinko <gamato@pobox.sk> To: freebsd-questions@freebsd.org Subject: Re: ssh tunnel - remote access through nat Message-ID: <452C1D3C.9090601@pobox.sk> In-Reply-To: <C00CADF4-AE1F-4F79-934B-17F1B30FE7E2@mac.com> References: <715841970607251003o1d358d3dl894291f50a0b8053@mail.gmail.com> <200607261247.53917.nvass@teledomenet.gr> <452C16E0.1010903@pobox.sk> <C00CADF4-AE1F-4F79-934B-17F1B30FE7E2@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Chuck Swiger wrote: > On Oct 10, 2006, at 2:55 PM, martinko wrote: >> [ ... ] >> The thing is that if I just simply create an rc script to achieve this, >> the script is run under root and ssh cannot make use of public key >> authentication which is set up now for a user running it manually. >> Or is there a way to change identity somehow or to run an rc script >> under different user account ?? > > Of course. One can use "su -" to run a command under another user, or > use the "ssh -i" option to pass the user's identity (ie, their SSH > private key) directly... > > ---Chuck > > su(1) usually asks for password. but it does not when run by root, of course. :-) i like `ssh -i`, too. only that i'll have to check whether it won't complain that identity file ownership doesn't match user running it. (which would be root i expect) also, i've been kindly reminded of cron(8) and its @reboot option. thank you all for your input! (i'd better go to bed now..;)) m.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?452C1D3C.9090601>