Re: 9.0-PRERELEASE slow scp transfer
On 11/22/2011 05:09 PM, Matthew Seaman wrote: > On 22/11/2011 15:17, Bas Smeelen wrote: >> When i copy a file with scp which is a few hundred megabytes on2. from 1.i >> get about 130 KB/s >> >> I can find nothing in the logs or netstat errors on this 9.0-PRERELEASE box. >> I have switched network kabels and ports on the switch. >> >> How could i further investigate? > Check the duplex settings in ifconfig(8) output on all three machines. > They should all say: > >media: Ethernet autoselect (1000baseTX ) > > assuming you're not forcing everything to a particular speed. Any > mention of '100baseTX ' indicates a failure to negotiate > the link settings, which could well be due to a hardware problem. Mind > you, in that case you'ld see plenty of errors in the output of 'netstat -i' > > If that's not the problem then it sounds like you've eliminated all the > obvious causes. Which means a bug in 9.0-PRERELEASE, so please bring > this up on freebsd-current@... where it should come to the attention of > the developers working on getting 9.0 out of the door. Include 'pciconf > -lbv' output for the NICs and PHYs on all three machines if you would be > so kind. > > Cheers, > > Matthew > OK, thanks for the reply. They're all autonegotiated (1) 7.3-RELEASE-p2 has 1000baseTX (2) 9.0-PRERELEASE has 1000baseT (3) 7.4-RELEASE-p4 has 1000baseTX So I have switched the cables of (1) and (2) but ifconfig output stays the same, though I would suspect that (1) would become 1000baseT and (2) would become 1000baseTX I have rebooted (2) just to make sure, but still no change in de output of ifconfig Putting (2) on another port of the switch doesn't change ifconfig output either But it's solved! scp now completes with: 100% 338MB 30.7MB/s 00:11 Hmm still it should be able to go up to 120MB/s, but this could a limitation somewhere else Sorry for the noise Disclaimer: http://www.ose.nl/email ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: 9.0-PRERELEASE slow scp transfer
On 22/11/2011 15:17, Bas Smeelen wrote: > When i copy a file with scp which is a few hundred megabytes on2. from 1.i > get about 130 KB/s > > I can find nothing in the logs or netstat errors on this 9.0-PRERELEASE box. > I have switched network kabels and ports on the switch. > > How could i further investigate? Check the duplex settings in ifconfig(8) output on all three machines. They should all say: media: Ethernet autoselect (1000baseTX ) assuming you're not forcing everything to a particular speed. Any mention of '100baseTX ' indicates a failure to negotiate the link settings, which could well be due to a hardware problem. Mind you, in that case you'ld see plenty of errors in the output of 'netstat -i' If that's not the problem then it sounds like you've eliminated all the obvious causes. Which means a bug in 9.0-PRERELEASE, so please bring this up on freebsd-current@... where it should come to the attention of the developers working on getting 9.0 out of the door. Include 'pciconf -lbv' output for the NICs and PHYs on all three machines if you would be so kind. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
9.0-PRERELEASE slow scp transfer
Hi I have a stange thing. 1. 7.3-RELEASE-p2 on dell poweredge SC440 with bge nic 2. 9.0-PRERELEASE on another dell poweredge SC440 bge nic 3. 7.4-RELEASE-p4 in a vmware virtual machine with em nic When i copy a file with scp which is a few hundred megabytes on 1. from 2. or from 3. i get about 10MB/s When i copy a filewith scpwhich is a few hundred megabytes on 3. from 1. or from 2. i get about 10MB/s When i copy a file with scpwhich is a few hundred megabytes on2. from 3.i get about 10MB/s When i copy a file with scp which is a few hundred megabytes on2. from 1.i get about 130 KB/s I can find nothing in the logs or netstat errors on this 9.0-PRERELEASE box. I have switched network kabels and ports on the switch. How could i further investigate? Thanks in advance Disclaimer: http://www.ose.nl/email ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
BUG: scp -pr does not copy directories that have ':' sign in their names
HI, Tri. scp -pr * name@host:/home/dir does not copy files which have ':' sign in their names -- С уважением, Коньков mailto:kes-...@yandex.ru ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Any way to have login output AND use rsync/scp ?
On Mon, 2 May 2011 02:13:17 +0200, Polytropon wrote: > On Sun, 1 May 2011 15:58:45 -0700 (PDT), George Sanders > wrote: > > I have my .cshrc file run some basic netstat and 'w' commands so that when > > I log > > in, I can see at a glance what is going on on the system and notice any > > unusual > > login activity, etc. > > > > However this completely breaks both scp and rsync - they cannot function at > > all > > (apparently) with any kind of stdio output from the shell. > > > > Is there any way around this ? > > > Create a file ~/.login and put your commands (in sh syntax, > not csh) there. This file will only be executed at interactive > logins. See "man csh", section FILES for details. Sorry, wrote before thinking. :-) Of course ~/.login is csh syntax, as I would guess after (missed to) read the file's header which states: # .login - csh login script, read by login shell, after `.cshrc' at login. # see also csh(1), environ(7). So simply moving your commands from .cshrc to .login should be fully sufficient. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Any way to have login output AND use rsync/scp ?
On Sun, 1 May 2011 15:58:45 -0700 (PDT), George Sanders wrote: > I have my .cshrc file run some basic netstat and 'w' commands so that when I > log > in, I can see at a glance what is going on on the system and notice any > unusual > login activity, etc. > > However this completely breaks both scp and rsync - they cannot function at > all > (apparently) with any kind of stdio output from the shell. > > Is there any way around this ? Create a file ~/.login and put your commands (in sh syntax, not csh) there. This file will only be executed at interactive logins. See "man csh", section FILES for details. > Is there some way to specify an alternate login shell when I use scp or rsync > ? I'm sure the login shell has to be defined by the system, usually by the /etc/passwd file, field "shell"; therefore see "man 5 passwd". > Or conversely: > > Is there some way for my login shell (csh) to notice that it is scp or rsync > accessing the system, and skip the text output for them ? I don't think so, but it should work fine when you move the commands out of the shell configuration file (which is also read by script shells AND interactive shells) to the login startup file (which is only executed if the shell is an interactive login shell). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Any way to have login output AND use rsync/scp ?
> Date: Sun, 1 May 2011 15:58:45 -0700 (PDT) > From: George Sanders > Subject: Any way to have login output AND use rsync/scp ? > > I have my .cshrc file run some basic netstat and 'w' commands so that > when I log in, I can see at a glance what is going on on the system and > notice any unusual login activity, etc. > > However this completely breaks both scp and rsync - they cannot function > at all > (apparently) with any kind of stdio output from the shell. > > Is there any way around this ? > > Is there some way to specify an alternate login shell when I use scp or > rsync ? > > Or conversely: > > Is there some way for my login shell (csh) to notice that it is scp or > rsync accessing the system, and skip the text output for them ? > > Thanks. > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions To > unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Any way to have login output AND use rsync/scp ?
I have my .cshrc file run some basic netstat and 'w' commands so that when I log in, I can see at a glance what is going on on the system and notice any unusual login activity, etc. However this completely breaks both scp and rsync - they cannot function at all (apparently) with any kind of stdio output from the shell. Is there any way around this ? Is there some way to specify an alternate login shell when I use scp or rsync ? Or conversely: Is there some way for my login shell (csh) to notice that it is scp or rsync accessing the system, and skip the text output for them ? Thanks. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
Gary Kline writes: > Just to make =sure= about this: can using tar/gtar as root [or > sudo] make sure that all the permissions are correct? It =may= > save me keystrokes, :_) Permissions, yes. If you want flags, you'll need the base system tar. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Tue, Aug 31, 2010 at 02:48:28PM +0100, krad wrote: > On 30 August 2010 20:02, Chris Rees wrote: > > > On 30 August 2010 18:37, krad wrote: > > > On 27 August 2010 20:13, Polytropon wrote: > > > > > >> On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten > > >> wrote: > > >> > Rename them, copy, then rename them back? > > >> > > >> Not good for a whole bunch of files; in this case: tar them together, > > >> transfer the archive, untar it; rename afterwards if needed. :-) > > > > > > or > > > > > > sudo tar cf - /somepath | ssh x...@y " sudo tar xvf - -C somepath " > > > > > > I agree with other posts though rsync is the easiest > > > > > > Why sudo with tar? > > > > Chris > > > > make sure all perms correct and can read all files Just to make =sure= about this: can using tar/gtar as root [or sudo] make sure that all the permissions are correct? It =may= save me keystrokes, :_) gary > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" > -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Advantage -vs- Disadvantage: SFTP -vs- SCP
On Tue, Aug 31, 2010 at 10:27 AM, krad wrote: > ill repeat "but why install extra things when you dont have to?". I dont > think i mentioned difficulty did i? > In addition to moving to a more tightly integrated OpenSSL derivative and the benefits from such a move, SCP performance greatly exceeds FTP based solutions IME. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Advantage -vs- Disadvantage: SFTP -vs- SCP
On 31 August 2010 16:27, krad wrote: > On 31 August 2010 15:18, Chris Rees wrote: >> On 31 August 2010 14:51, krad wrote: >> > On 30 August 2010 18:38, Adam Vande More wrote: >> >> On Mon, Aug 30, 2010 at 12:30 PM, krad wrote: >> >>> sounds like a bodge to me >> >> Sounds like FUD to me. >> >> >> >> -- >> >> Adam Vande More >> > maybe but why install extra things when you dont have to. >> >> Because this allows people to use scp and nothing else; mooting your >> argument: >> >> ''SFTP is better than scp if you just want to transfer files, as the users >> dont have to have shell access to the box to use the openssh SFTP >> system. [snip]'' >> >> How difficult is it to install a port, really? Do you ever run with >> just the base system? >> > ill repeat "but why install extra things when you dont have to?". I dont > think i mentioned difficulty did i? So what's the problem? It allows you to use whatever protocol you like, without worrying about shell access. Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Advantage -vs- Disadvantage: SFTP -vs- SCP
On 31 August 2010 15:18, Chris Rees wrote: > On 31 August 2010 14:51, krad wrote: > > On 30 August 2010 18:38, Adam Vande More wrote: > > > >> On Mon, Aug 30, 2010 at 12:30 PM, krad wrote: > >> > >>> > >>> sounds like a bodge to me > >>> > >> > >> Sounds like FUD to me. > >> > >> -- > >> Adam Vande More > >> > > > > > > maybe but why install extra things when you dont have to. > > Because this allows people to use scp and nothing else; mooting your > argument: > > ''SFTP is better than scp if you just want to transfer files, as the users > dont have to have shell access to the box to use the openssh SFTP > system. [snip]'' > > How difficult is it to install a port, really? Do you ever run with > just the base system? > > Chris > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscr...@freebsd.org" > ill repeat "but why install extra things when you dont have to?". I dont think i mentioned difficulty did i? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Advantage -vs- Disadvantage: SFTP -vs- SCP
On 31 August 2010 14:51, krad wrote: > On 30 August 2010 18:38, Adam Vande More wrote: > >> On Mon, Aug 30, 2010 at 12:30 PM, krad wrote: >> >>> >>> sounds like a bodge to me >>> >> >> Sounds like FUD to me. >> >> -- >> Adam Vande More >> > > > maybe but why install extra things when you dont have to. Because this allows people to use scp and nothing else; mooting your argument: ''SFTP is better than scp if you just want to transfer files, as the users dont have to have shell access to the box to use the openssh SFTP system. [snip]'' How difficult is it to install a port, really? Do you ever run with just the base system? Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Advantage -vs- Disadvantage: SFTP -vs- SCP
On 30 August 2010 18:38, Adam Vande More wrote: > On Mon, Aug 30, 2010 at 12:30 PM, krad wrote: > >> >> sounds like a bodge to me >> > > Sounds like FUD to me. > > -- > Adam Vande More > maybe but why install extra things when you dont have to. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On 30 August 2010 20:02, Chris Rees wrote: > On 30 August 2010 18:37, krad wrote: > > On 27 August 2010 20:13, Polytropon wrote: > > > >> On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten > >> wrote: > >> > Rename them, copy, then rename them back? > >> > >> Not good for a whole bunch of files; in this case: tar them together, > >> transfer the archive, untar it; rename afterwards if needed. :-) > > > > or > > > > sudo tar cf - /somepath | ssh x...@y " sudo tar xvf - -C somepath " > > > > I agree with other posts though rsync is the easiest > > > Why sudo with tar? > > Chris > make sure all perms correct and can read all files ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
nopassword ssh/scp going from freebsd to ubuntu linux?
can anybody point me to the web directions of howto automate the % ssh -i /home/kline/.ssh/Zeropasswd-id zen so i can get around with fewer keystrokes? and automate some backup stuff? tia, guys. -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On 30 August 2010 18:37, krad wrote: > On 27 August 2010 20:13, Polytropon wrote: > >> On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten >> wrote: >> > Rename them, copy, then rename them back? >> >> Not good for a whole bunch of files; in this case: tar them together, >> transfer the archive, untar it; rename afterwards if needed. :-) > > or > > sudo tar cf - /somepath | ssh x...@y " sudo tar xvf - -C somepath " > > I agree with other posts though rsync is the easiest Why sudo with tar? Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On 27 August 2010 19:15, Gary Kline wrote: > On Fri, Aug 27, 2010 at 10:54:52AM -0700, Jason wrote: > > On Fri, Aug 27, 2010 at 10:51:41AM -0700, Gary Kline thus spake: > > >On Fri, Aug 27, 2010 at 10:25:01AM -0700, Jason Helfman wrote: > > >>On Fri, 27 Aug 2010 13:19:40 -0400 > > >>Glen Barber wrote: > > >> > > >>> On 8/27/10 1:07 PM, Gary Kline wrote: > > >>> > > > >>> > guys, > > >>> > > > >>> > this is the start of my master switchover. how to i copy/scp,say, > > >>> > ~/.purpur to home/kline/.purple? along with many hundreds of other > > >>> > dot files? scp doesn't do it. > > >>> > > > >>> > tx, > > >>> > > > >>> > > >>> scp u...@foo:\.dotfile .dotfile > > >>> > > >>> Regards, > > >>> > > >> > > >>Use rsync over ssh. > > >> > > >> > > > > > > > > > i've already done 98 or so straight scp copies. the thing is how > > > to use rsync over to an empty ethic? [[ empty == "there are no \ > > > dot files not .directories"] i want EVERYTHING from this desktop, > > > tao, temp on ethic. > > > > > > thanks > > > > > > > > You can just use rsync in cooperation with find command. > > > > I've used it before, but found this as an example with a web search. > > rsync -avR remote:'`find /home -name "*.[ch]"`' /tmp/ > > > > Just reverse the order. > > > > this may be close. use the unix tools and glue them together:-) > >i have this, cobbled together from a prev script: > > > > echo "rsync with checksum from directory [${PWD}] to > [kl...@ethic:${EPWD}]"; > > rsync --perms --times --update --compress --verbose \ >--checksum -e "ssh -i /home/kline/.ssh/tao_nopasswd-id" \ > ${PWD} kl...@ethic:${EPWD}; > if [ $? = 0 ] > then > echo "rsync transfer went okay, tao to ethic"|mail > kl...@thought.org > else > echo "rsync failed to ethic from /home/kline"|mail > kl...@thought.org > fi > > exit; > >but this fails .. > >any clues?? > > > > -jgh > > ___ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to " > freebsd-questions-unsubscr...@freebsd.org" > > -- > Gary Kline kl...@thought.org http://www.thought.org Public Service > Unix >The 7.83a release of Jottings: http://jottings.thought.org/index.php > http://journey.thought.org > > > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscr...@freebsd.org" > rsync is probably trying to chown files to ownerships it cant. The best way I have found to do this and keep things fairly secure it to run an rsync server on the source machine but bind it to loopback. Then tunnel the the server over ssh when you go into the box. This allows things to run relatively safely as root. eg ssh -R 873:127.0.0.1:873 " sudo rsync -aP --numeric-ids 127.0.0.1::HOME/ /home/ " if you just want certain user dirs then add some include and exclude flags eg --include="/home/kline" -- include="/home/kline/**" --exclude="/home/**" ordering is important here. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Advantage -vs- Disadvantage: SFTP -vs- SCP
On Mon, Aug 30, 2010 at 12:30 PM, krad wrote: > > sounds like a bodge to me > Sounds like FUD to me. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On 27 August 2010 20:13, Polytropon wrote: > On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten > wrote: > > Rename them, copy, then rename them back? > > Not good for a whole bunch of files; in this case: tar them together, > transfer the archive, untar it; rename afterwards if needed. :-) > > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscr...@freebsd.org" > or sudo tar cf - /somepath | ssh x...@y " sudo tar xvf - -C somepath " I agree with other posts though rsync is the easiest ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Advantage -vs- Disadvantage: SFTP -vs- SCP
On 30 August 2010 06:00, Adam Vande More wrote: > On Fri, Aug 27, 2010 at 3:39 AM, krad wrote: > >> >> SFTP is better than scp if you just want to transfer files, as the users >> dont have to have shell access to the box to use the openssh SFTP system. >> As >> mentioned above dont confuse sftp with ftps/ftp-ssl >> > > /usr/ports/shells/scponly > > -- > Adam Vande More > sounds like a bodge to me ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Advantage -vs- Disadvantage: SFTP -vs- SCP
On Fri, Aug 27, 2010 at 3:39 AM, krad wrote: > > SFTP is better than scp if you just want to transfer files, as the users > dont have to have shell access to the box to use the openssh SFTP system. > As > mentioned above dont confuse sftp with ftps/ftp-ssl > /usr/ports/shells/scponly -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Advantage -vs- Disadvantage: SFTP -vs- SCP
Dear Sir/Madam, Your email was unable reach the intended person that you were sending it to. For more information on our business please click on the following link: [1]Click here for our website We look forward to your continued business in the future. Regards, Webmaster References 1. http://www.xpbargains.net/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Sunday 29 August 2010, Polytropon wrote: > The "problem" (i. e. a convention) is that .* is not part of *, > which includes everything else, even "nothing", and the > form *.* (that looks like the DOS equivalent of "all files") > does seem to omit .*; the spaced form * .* would work as it > contains * (which does not contain .*) and .* (not in *). :-) The problem with using .* as a wildcard for hidden files is that it will include .. which is almost certainly not what you want. For example rm -r .* can be disastrous. A safer wildcard for hidden dotfiles and everything else could be .[^.]* * -- Mike Clarke ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Sun, Aug 29, 2010 at 09:34:59PM +0200, Polytropon wrote: > On Sun, 29 Aug 2010 12:12:11 -0700, mer...@stonehenge.com (Randal L. > Schwartz) wrote: > > > "'Gary" == 'Gary Kline' writes: > > > > >> There's a big difference between: > > >> > > >> cd $HOME && gtar cfz /tmp/xx.tgz . # should get everything > > >> > > >> and > > >> > > >> cd $HOME && gtar cfz /tmp/xx.tgz * # will miss all the dotfiles > > >> > > >> Did you do the latter, by chance? > > > > > > 'Gary> Sure. my default is the asterisk. > > > > Well, there's your problem. Sometimes, you have to actually think > > about what you're doing. :) > > The "problem" (i. e. a convention) is that .* is not part of *, > which includes everything else, even "nothing", and the > form *.* (that looks like the DOS equivalent of "all files") > does seem to omit .*; the spaced form * .* would work as it > contains * (which does not contain .*) and .* (not in *). :-) > ouvh, ouch, ouch!1 running away, pulling out my one remaining hair:) ...and now, no mo' mail until, oh, around 02:15 -g > > > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Sun, Aug 29, 2010 at 12:12:11PM -0700, Randal L. Schwartz wrote: > > "'Gary" == 'Gary Kline' writes: > > >> There's a big difference between: > >> > >> cd $HOME && gtar cfz /tmp/xx.tgz . # should get everything > >> > >> and > >> > >> cd $HOME && gtar cfz /tmp/xx.tgz * # will miss all the dotfiles > >> > >> Did you do the latter, by chance? > > > 'Gary>Sure. my default is the asterisk. > > Well, there's your problem. Sometimes, you have to actually think > about what you're doing. :) > LOL! man, when i get into hackery mode--especially playing at being a system admin-- i just go into autopilot. well, live and learn. this stuff has been a good reminder. hope it helps a few others listmembers. (FWIW,I actually did find the dot vs asterisk note in a old howto file. i dont know if i ought to fess up, but i am.) here's another fwiw before i really launch: it pays to do a du from $HOME every few [n] months. i'm finding so much unused crud, e.g. ~/.wine from 2004, that my drive is going to weigh a few pounds less... > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 > http://www.stonehenge.com/merlyn/> > Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. > See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Sun, 29 Aug 2010 12:12:11 -0700, mer...@stonehenge.com (Randal L. Schwartz) wrote: > > "'Gary" == 'Gary Kline' writes: > > >> There's a big difference between: > >> > >> cd $HOME && gtar cfz /tmp/xx.tgz . # should get everything > >> > >> and > >> > >> cd $HOME && gtar cfz /tmp/xx.tgz * # will miss all the dotfiles > >> > >> Did you do the latter, by chance? > > > 'Gary>Sure. my default is the asterisk. > > Well, there's your problem. Sometimes, you have to actually think > about what you're doing. :) The "problem" (i. e. a convention) is that .* is not part of *, which includes everything else, even "nothing", and the form *.* (that looks like the DOS equivalent of "all files") does seem to omit .*; the spaced form * .* would work as it contains * (which does not contain .*) and .* (not in *). :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
> "'Gary" == 'Gary Kline' writes: >> There's a big difference between: >> >> cd $HOME && gtar cfz /tmp/xx.tgz . # should get everything >> >> and >> >> cd $HOME && gtar cfz /tmp/xx.tgz * # will miss all the dotfiles >> >> Did you do the latter, by chance? 'Gary> Sure. my default is the asterisk. Well, there's your problem. Sometimes, you have to actually think about what you're doing. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Sun, Aug 29, 2010 at 07:06:33AM -0700, Randal L. Schwartz wrote: > > "'Gary" == 'Gary Kline' writes: > > 'Gary>at least for me, gtar fails to pick up dotfiles. > > How did you invoke it? > > There's a big difference between: > > cd $HOME && gtar cfz /tmp/xx.tgz . # should get everything > > and > > cd $HOME && gtar cfz /tmp/xx.tgz * # will miss all the dotfiles > > Did you do the latter, by chance? Sure. my default is the asterisk. ...Anyway, i used matthew's -r for recursion [with rsync] and even tested --delete on some junk ~kline/.4kde/* stuff. then slowly, got rid of more junk [[unused for =years=]] directories and files. pretty soon i'll be ready to save everything from here [tao/present/oldtao] to ethic. then i'll move everything to the newtao. then i'll give away my '03 tower. "do unto others... " or whatever:) gary PS: thanks for the tip, randal! i may have that somewhere in some obscure ~/.notesfile. > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 > http://www.stonehenge.com/merlyn/> > Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. > See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
> "'Gary" == 'Gary Kline' writes: 'Gary> at least for me, gtar fails to pick up dotfiles. How did you invoke it? There's a big difference between: cd $HOME && gtar cfz /tmp/xx.tgz . # should get everything and cd $HOME && gtar cfz /tmp/xx.tgz * # will miss all the dotfiles Did you do the latter, by chance? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Sat, 28 Aug 2010 18:05:31 -0700, "'Gary Kline'" wrote: > at least for me, gtar fails to pick up dotfiles. rsynx copies > =everything=, and it looks like the test rsync script i posted > last night was working all along. it was So fast that i assumed > it was bombing entirely. i will 2-ck a few more files before i > am sure. > > a question to the list is how can i copy ALL of /home to my new > server? If it is the 1st copy, I'd suggest using dump + restore. This of course will only work if your /home is a separate partition on both systems. Partition size doesn't matter as long as the size of the target partition is at least the size of the used data on the source partition. You basically umount /home and then use # dump -Lauf0 home.dump /dev/ad0s1f to obtain the data; you can also use - instead of the actual file home.dump to pipe the data directly to a transfer via scp. On the target machine, # cd /home # restore -rf /where/is/home.dump You can connect both commands with ssh so you can directly dump + restore from machine A to machine B, given that SSH is possible. It then would be something like this: # dump -0Lauf - /dev/ad0s1f | ssh 10.0.0.10 "cd /home && cat | restore -rf -" In this example, 10.0.0.10 is the IP of the target machine, and you're issuing the command from the source machine, with /home unmounted. Note that dump requires the DEVICE NAME of the device where /home is mounted on, and restore will put everything into the CURRENT DIRECTORY. The source device must NOT be mounted, but the target directory must be mounted and accessible. You CAN, however, leave /home mounted, and dump will create a snapshot that identifies /home as at the starting point in time; changes during backup won't be reflected in the target. It CAN be possible get inconsistencies during creation of the snapshot if there's heavy activity on /home, so it's usually "the safe way" to umount /home before reading from the device file. This method makes sure you will get ALL files with their exact properties (permissions, flags, dates). See 18.2.1 here: http://www.freebsd.org/doc/en/books/handbook/backup-basics.html For any further synchronisation, I would go with rsync. There is also another interesting tool in ports: It is called cpdup. It can also be used for synchronisation, and it has the interesting feature (can be configured of course) that it won't delete files in the target that have been deleted in source since the last run. In this case, your target data will always grow, and if you acciden- tally deleted something, it will sill be there. > and to you, matthew, does --delete rm out of date files > or directories? The --delete parameter will have rsync delete files on the target that are NOT part of the source files, but only relative to the subtree you are transfering. E. g. on your target machine you already have src/foo.tex src/bar.tex src/meow.c from last time you synchronized, and you have the files src/foo.tex src/bar.tex as never versions in the source, and you also deleted meow.c here because you don't need it anymore. Now if you rsync the src/ dir to the target machine, --delete will remove meow.c from the target, and rsync will of course update foo.tex and bar.tex. The --delete makes sure that the copy is of 1:1 kind, instead of incremental. > what about ?VS, given that i have virtually > everything under [CR]VS control? slightly offtopic is that i > accidently rm'd a file on tao one morning after a few minutes work. > a copy was safely croned to ethic. A good suggestion. I did use cvsup (from ports) in the past for revision control and "idiotproof storage" for most stuff that I created. It is very helpful, not just for "recovering" accidentally deleted files, but also for progress check and "rewinding" changes. It's a great tool for keeping configuration files also. Backing it up gives you a versioned, ordered, one-tree consistent file collection. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Sat, Aug 28, 2010 at 11:29:29AM +0100, Matthew Seaman wrote: > On 28/08/2010 08:02:31, 'Gary Kline' wrote: > > On Fri, Aug 27, 2010 at 09:13:06PM +0200, Polytropon wrote: > >> On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten > >> wrote: > >>> Rename them, copy, then rename them back? > >> > >> Not good for a whole bunch of files; in this case: tar them together, > >> transfer the archive, untar it; rename afterwards if needed. :-) > >> > > > > If i'm going to rename, say, ~/.Plans to ~/Plans and ~/.HowtoI18 to > > ~/HowtoI18, I may just scp -rp every ~/[.] file. the idea of using > > find to collect a tarball may work. > > I've been reading this thread, and I'm somewhat at a loss as to why you > need to rename all of the dotfiles at all, Gary. Dotfiles are just > ordinary files, and programs like find(1), scp(1) or tar(1) will handle > them just like any other file. The only difference is that shells by > default don't include dotfiles in some glob expansions and ls(1) doesn't > include them in directory listings. Of course, either of the above can > be overridden: 'echo * .*' or 'ls -a' will show all files including > dotfiles. > > The one slightly tricky thing about dealing with dotfiles is the > presence of '..' -- the standard link to the directory above the current > one. If you accidentally include that in a list of directories to > recurse through, then you'll end up affecting a bunch of stuff that > maybe you didn't expect. So long as you are aware of the possibility > it's pretty easy to avoid this problem. > > To make a copy of your home directory on tao to a temporary directory on > ethic, personally I'd use rsync(1) [in ports as net/rsync]. Then you > can just do: > > % rsync -avx --delete ~/ ethic:/home/kline/ > > It will default to running over ssh(1), so you need to make sure you can > ssh from tao to ethic before you begin. > > The neat thing is that you run that command repeatedly, and each > subsequent time it will copy only what has changed on tao over to ethic. > > I see someone has given instructions for setting up anonymous rsync -- > that's another possibility, but probably a bit OTT for this particular > job. Anonymous rsync is probably best thought of as a superior > replacement for anonymous FTP. > > Cheers, > > Matthew > at least for me, gtar fails to pick up dotfiles. rsynx copies =everything=, and it looks like the test rsync script i posted last night was working all along. it was So fast that i assumed it was bombing entirely. i will 2-ck a few more files before i am sure. a question to the list is how can i copy ALL of /home to my new server? and to you, matthew, does --delete rm out of date files or directories? what about ?VS, given that i have virtually everything under [CR]VS control? slightly offtopic is that i accidently rm'd a file on tao one morning after a few minutes work. a copy was safely croned to ethic. (yes, i needed mmore coffee, but i was giving thanks to zeus that hours of research and writing were safe!) gary > -- > Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard > Flat 3 > PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate > JID: matt...@infracaninophile.co.uk Kent, CT11 9PW > -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On 28/08/2010 08:02:31, 'Gary Kline' wrote: > On Fri, Aug 27, 2010 at 09:13:06PM +0200, Polytropon wrote: >> On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten wrote: >>> Rename them, copy, then rename them back? >> >> Not good for a whole bunch of files; in this case: tar them together, >> transfer the archive, untar it; rename afterwards if needed. :-) >> > > If i'm going to rename, say, ~/.Plans to ~/Plans and ~/.HowtoI18 to > ~/HowtoI18, I may just scp -rp every ~/[.] file. the idea of using > find to collect a tarball may work. I've been reading this thread, and I'm somewhat at a loss as to why you need to rename all of the dotfiles at all, Gary. Dotfiles are just ordinary files, and programs like find(1), scp(1) or tar(1) will handle them just like any other file. The only difference is that shells by default don't include dotfiles in some glob expansions and ls(1) doesn't include them in directory listings. Of course, either of the above can be overridden: 'echo * .*' or 'ls -a' will show all files including dotfiles. The one slightly tricky thing about dealing with dotfiles is the presence of '..' -- the standard link to the directory above the current one. If you accidentally include that in a list of directories to recurse through, then you'll end up affecting a bunch of stuff that maybe you didn't expect. So long as you are aware of the possibility it's pretty easy to avoid this problem. To make a copy of your home directory on tao to a temporary directory on ethic, personally I'd use rsync(1) [in ports as net/rsync]. Then you can just do: % rsync -avx --delete ~/ ethic:/home/kline/ It will default to running over ssh(1), so you need to make sure you can ssh from tao to ethic before you begin. The neat thing is that you run that command repeatedly, and each subsequent time it will copy only what has changed on tao over to ethic. I see someone has given instructions for setting up anonymous rsync -- that's another possibility, but probably a bit OTT for this particular job. Anonymous rsync is probably best thought of as a superior replacement for anonymous FTP. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: how do i scp .dotfiles??
On 28 August 2010 08:02, Gary Kline wrote: > On Fri, Aug 27, 2010 at 09:13:06PM +0200, Polytropon wrote: >> On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten wrote: >> > Rename them, copy, then rename them back? >> >> Not good for a whole bunch of files; in this case: tar them together, >> transfer the archive, untar it; rename afterwards if needed. :-) >> > > If i'm going to rename, say, ~/.Plans to ~/Plans and ~/.HowtoI18 to > ~/HowtoI18, I may just scp -rp every ~/[.] file. the idea of using > find to collect a tarball may work. > How about: $ tar cjf - *dotfile* | ssh machine 'tar xvjf -' Much less fiddly! Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Fri, Aug 27, 2010 at 09:13:06PM +0200, Polytropon wrote: > On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten wrote: > > Rename them, copy, then rename them back? > > Not good for a whole bunch of files; in this case: tar them together, > transfer the archive, untar it; rename afterwards if needed. :-) > If i'm going to rename, say, ~/.Plans to ~/Plans and ~/.HowtoI18 to ~/HowtoI18, I may just scp -rp every ~/[.] file. the idea of using find to collect a tarball may work. > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten wrote: > Rename them, copy, then rename them back? Not good for a whole bunch of files; in this case: tar them together, transfer the archive, untar it; rename afterwards if needed. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Fri, Aug 27, 2010, Gary Kline wrote: >On Fri, Aug 27, 2010 at 10:29:14AM -0700, Bill Campbell wrote: >> On Fri, Aug 27, 2010, Gary Kline wrote: >> > >> >guys, >> > >> >this is the start of my master switchover. how to i copy/scp,say, >> >~/.purpur to home/kline/.purple? along with many hundreds of other >> >dot files? scp doesn't do it. >> > >> scp -r to recursively copy directories? That should get >> everything in each directory. >> >> We tend to use rsync for this, making an initial copy to get the >> majority of the files transferred before making the final cut >> over, the ``rsync --delete ...'' to bring things up to date >> before making the final switch. When switching to a new mail >> server we have done this live with about 10,000 users, but when >> we did this, we left the Maildir stores empty before the final >> rsync and didn't use --delete on the Maildir directories. This >> allowed new mail to be processed as it came in, and the older >> mail wouldn't conflict as the Maildir message file names should >> be unique. >> > > So what would the rsync line be starting from ~kline and pointing > at ethiv? ethic is my temporary savings machine while i install > the "newtao", m y new desktop. Assuming that ~kline is /home/kline and will go to /home/kline on the remote machine this would work (decoding the options is left as an exersize for the student :-). cd /home rsync -vaHrP kline othermachine:/home A more general solution that doesn't require ssh, but connects to the rsync daemon on the remote machine might be to create a module definition in the destination machine's /etc/rsyncd.conf file something like this: [myhome] uid = myusername gid = mygroupname read only = false use chroot = true path = /path/to/myhomedirectory comment = /path/to/myhomedirectory hosts allow = sourceipaddress hosts deny = * Then the rsync command could be: rsync -vaHrP ~/kline/ othermachine::myhome/ This has a couple of advantages. First the destination uid:gid can be different on the destination machine as rsync uses the names in the group and passwd database. Assuming you're on a LAN where ssh security isn't critical using the daemon/module approach doesn't require ssh authorized_keys, and can be restricted to one or more IP addresses or CIDR blocks. We use this when moving between systems where the uid:gid mapping is different when moving between machines of differing OS releases (e.g. SuSE Linux to FreeBSD), or where the destination machine may have existing users with conflicting uid:gid s Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206) 232-9186 Skype: jwccsllc (206) 855-5792 ... because most politicians and bureaucrats are technological idiots, it's going to be crucial for the rank and file members of the IT community to find its collective voice soon. --Michael Vizard, InfoWorld Editor in Chief. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Fri, Aug 27, 2010 at 10:54:52AM -0700, Jason wrote: > On Fri, Aug 27, 2010 at 10:51:41AM -0700, Gary Kline thus spake: > >On Fri, Aug 27, 2010 at 10:25:01AM -0700, Jason Helfman wrote: > >>On Fri, 27 Aug 2010 13:19:40 -0400 > >>Glen Barber wrote: > >> > >>> On 8/27/10 1:07 PM, Gary Kline wrote: > >>> > > >>> > guys, > >>> > > >>> > this is the start of my master switchover. how to i copy/scp,say, > >>> > ~/.purpur to home/kline/.purple? along with many hundreds of other > >>> > dot files? scp doesn't do it. > >>> > > >>> > tx, > >>> > > >>> > >>> scp u...@foo:\.dotfile .dotfile > >>> > >>> Regards, > >>> > >> > >>Use rsync over ssh. > >> > >> > > > > > > i've already done 98 or so straight scp copies. the thing is how > > to use rsync over to an empty ethic? [[ empty == "there are no \ > > dot files not .directories"] i want EVERYTHING from this desktop, > > tao, temp on ethic. > > > > thanks > > > > > You can just use rsync in cooperation with find command. > > I've used it before, but found this as an example with a web search. > rsync -avR remote:'`find /home -name "*.[ch]"`' /tmp/ > > Just reverse the order. this may be close. use the unix tools and glue them together:-) i have this, cobbled together from a prev script: echo "rsync with checksum from directory [${PWD}] to [kl...@ethic:${EPWD}]"; rsync --perms --times --update --compress --verbose \ --checksum -e "ssh -i /home/kline/.ssh/tao_nopasswd-id" \ ${PWD} kl...@ethic:${EPWD}; if [ $? = 0 ] then echo "rsync transfer went okay, tao to ethic"|mail kl...@thought.org else echo "rsync failed to ethic from /home/kline"|mail kl...@thought.org fi exit; but this fails .. any clues?? > > -jgh > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On 8/27/10 1:51 PM, Gary Kline wrote: i've already done 98 or so straight scp copies. the thing is how to use rsync over to an empty ethic? [[ empty == "there are no \ dot files not .directories"] i want EVERYTHING from this desktop, tao, temp on ethic. thanks An alternative I use sometimes when there is ample disk space on the source machine is to create a big tar file of everything in the user's home directory, scp the tar file, and then extract into the new home directory on the destination machine. Personally I find that slightly easier to keep track of. There are many ways to skin this cat -- --Jon Radel j...@radel.com
Re: how do i scp .dotfiles??
On Fri, Aug 27, 2010 at 10:51:41AM -0700, Gary Kline thus spake: On Fri, Aug 27, 2010 at 10:25:01AM -0700, Jason Helfman wrote: On Fri, 27 Aug 2010 13:19:40 -0400 Glen Barber wrote: > On 8/27/10 1:07 PM, Gary Kline wrote: > > > > guys, > > > > this is the start of my master switchover. how to i copy/scp,say, > > ~/.purpur to home/kline/.purple? along with many hundreds of other > > dot files? scp doesn't do it. > > > > tx, > > > > scp u...@foo:\.dotfile .dotfile > > Regards, > Use rsync over ssh. i've already done 98 or so straight scp copies. the thing is how to use rsync over to an empty ethic? [[ empty == "there are no \ dot files not .directories"] i want EVERYTHING from this desktop, tao, temp on ethic. thanks You can just use rsync in cooperation with find command. I've used it before, but found this as an example with a web search. rsync -avR remote:'`find /home -name "*.[ch]"`' /tmp/ Just reverse the order. -jgh ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Fri, Aug 27, 2010 at 10:25:01AM -0700, Jason Helfman wrote: > On Fri, 27 Aug 2010 13:19:40 -0400 > Glen Barber wrote: > > > On 8/27/10 1:07 PM, Gary Kline wrote: > > > > > > guys, > > > > > > this is the start of my master switchover. how to i copy/scp,say, > > > ~/.purpur to home/kline/.purple? along with many hundreds of other > > > dot files? scp doesn't do it. > > > > > > tx, > > > > > > > scp u...@foo:\.dotfile .dotfile > > > > Regards, > > > > Use rsync over ssh. > > i've already done 98 or so straight scp copies. the thing is how to use rsync over to an empty ethic? [[ empty == "there are no \ dot files not .directories"] i want EVERYTHING from this desktop, tao, temp on ethic. thanks > -- > Jason Helfman > System Administrator > experts-exchange.com > http://www.experts-exchange.com/M_4830110.html -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Fri, Aug 27, 2010 at 10:29:14AM -0700, Bill Campbell wrote: > On Fri, Aug 27, 2010, Gary Kline wrote: > > > >guys, > > > >this is the start of my master switchover. how to i copy/scp,say, > >~/.purpur to home/kline/.purple? along with many hundreds of other > >dot files? scp doesn't do it. > > > scp -r to recursively copy directories? That should get > everything in each directory. > > We tend to use rsync for this, making an initial copy to get the > majority of the files transferred before making the final cut > over, the ``rsync --delete ...'' to bring things up to date > before making the final switch. When switching to a new mail > server we have done this live with about 10,000 users, but when > we did this, we left the Maildir stores empty before the final > rsync and didn't use --delete on the Maildir directories. This > allowed new mail to be processed as it came in, and the older > mail wouldn't conflict as the Maildir message file names should > be unique. > > Bill > -- So what would the rsync line be starting from ~kline and pointing at ethiv? ethic is my temporary savings machine while i install the "newtao", m y new desktop. gary -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Fri, 27 Aug 2010 13:19:40 -0400 Glen Barber wrote: > On 8/27/10 1:07 PM, Gary Kline wrote: > > > > guys, > > > > this is the start of my master switchover. how to i copy/scp,say, > > ~/.purpur to home/kline/.purple? along with many hundreds of other > > dot files? scp doesn't do it. > > > > tx, > > > > scp u...@foo:\.dotfile .dotfile > > Regards, > Use rsync over ssh. -- Jason Helfman System Administrator experts-exchange.com http://www.experts-exchange.com/M_4830110.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On Fri, Aug 27, 2010, Gary Kline wrote: > >guys, > >this is the start of my master switchover. how to i copy/scp,say, >~/.purpur to home/kline/.purple? along with many hundreds of other >dot files? scp doesn't do it. > scp -r to recursively copy directories? That should get everything in each directory. We tend to use rsync for this, making an initial copy to get the majority of the files transferred before making the final cut over, the ``rsync --delete ...'' to bring things up to date before making the final switch. When switching to a new mail server we have done this live with about 10,000 users, but when we did this, we left the Maildir stores empty before the final rsync and didn't use --delete on the Maildir directories. This allowed new mail to be processed as it came in, and the older mail wouldn't conflict as the Maildir message file names should be unique. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206) 232-9186 Skype: jwccsllc (206) 855-5792 Rights is a fictional abstraction. No one has ``Rights'', neither machines nor flesh-and-blood. Persons... have opportunities, not rights, which they use or do not use. -- Lazarus Long ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
RE: how do i scp .dotfiles??
Rename them, copy, then rename them back? -Original Message- From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Gary Kline Sent: Friday, August 27, 2010 12:08 PM To: FreeBSD Mailing List Subject: how do i scp .dotfiles?? guys, this is the start of my master switchover. how to i copy/scp,say, ~/.purpur to home/kline/.purple? along with many hundreds of other dot files? scp doesn't do it. tx, gary -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" "This email is intended to be reviewed by only the intended recipient and may contain information that is privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any review, use, dissemination, disclosure or copying of this email and its attachments, if any, is strictly prohibited. If you have received this email in error, please immediately notify the sender by return email and delete this email from your system." ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: how do i scp .dotfiles??
On 8/27/10 1:07 PM, Gary Kline wrote: > > guys, > > this is the start of my master switchover. how to i copy/scp,say, > ~/.purpur to home/kline/.purple? along with many hundreds of other > dot files? scp doesn't do it. > > tx, > scp u...@foo:\.dotfile .dotfile Regards, -- Glen Barber ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
how do i scp .dotfiles??
guys, this is the start of my master switchover. how to i copy/scp,say, ~/.purpur to home/kline/.purple? along with many hundreds of other dot files? scp doesn't do it. tx, gary -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Advantage -vs- Disadvantage: SFTP -vs- SCP
On 27 August 2010 06:19, Matthew Seaman wrote: > On 26/08/2010 23:07:35, Ed Flecko wrote: > > > I have a server I'm building that is internet accessible and I'm > > wondering if there's any advantages/disadvantages of using either SFTP > > -vs- SCP? > > > > My primary concern is overall security of the server (even if that > > means inconveniencing the end users), and I'm wondering if one method > > might be better than the other? > > It depends what you mean by SFTP. If you mean the SSH sub-system (file > transfer tunnelled over SSH using a client which works like the FTP > client), then there is no practical difference in security compared to > scp(1). sftp(1) and scp(1) are very similar over the wire and > server-side: it's just the client interface that's different. > > On the other hand, if you mean crusty old FTP tarted up with some SSL > trappings -- which should really be called FTPS, but lots of people are > confused about the naming -- then *run away*. It may run over SSL, but > it has all of the design flaws of regular FTP plus the fact that it's > over SSL means you can't even use firewall proxies like ftp-proxy(8). > > If you want a means of secure upload that can be used natively from > windows, try WebDAV. You can, in theory, mount a WebDAV directory as a > partition in Windows, although this is a lot more painful than it needs > to be. (As they say: with Windows, failure is not an option). The same > thing on a Mac works beautifully, but then it's Unix already and you can > just use sftp or scp natively from Terminal.app. See the appendix to > the SVN manual for some useful hints: > > http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.webdav > >Cheers, > >Matthew > > -- > Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard > Flat 3 > PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate > JID: matt...@infracaninophile.co.uk Kent, CT11 9PW > > SFTP is better than scp if you just want to transfer files, as the users dont have to have shell access to the box to use the openssh SFTP system. As mentioned above dont confuse sftp with ftps/ftp-ssl ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Advantage -vs- Disadvantage: SFTP -vs- SCP
On 26/08/2010 23:07:35, Ed Flecko wrote: > I have a server I'm building that is internet accessible and I'm > wondering if there's any advantages/disadvantages of using either SFTP > -vs- SCP? > > My primary concern is overall security of the server (even if that > means inconveniencing the end users), and I'm wondering if one method > might be better than the other? It depends what you mean by SFTP. If you mean the SSH sub-system (file transfer tunnelled over SSH using a client which works like the FTP client), then there is no practical difference in security compared to scp(1). sftp(1) and scp(1) are very similar over the wire and server-side: it's just the client interface that's different. On the other hand, if you mean crusty old FTP tarted up with some SSL trappings -- which should really be called FTPS, but lots of people are confused about the naming -- then *run away*. It may run over SSL, but it has all of the design flaws of regular FTP plus the fact that it's over SSL means you can't even use firewall proxies like ftp-proxy(8). If you want a means of secure upload that can be used natively from windows, try WebDAV. You can, in theory, mount a WebDAV directory as a partition in Windows, although this is a lot more painful than it needs to be. (As they say: with Windows, failure is not an option). The same thing on a Mac works beautifully, but then it's Unix already and you can just use sftp or scp natively from Terminal.app. See the appendix to the SVN manual for some useful hints: http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.webdav Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: Advantage -vs- Disadvantage: SFTP -vs- SCP
On Thu, Aug 26, 2010, Ed Flecko wrote: >Hi folks, >I have a server I'm building that is internet accessible and I'm >wondering if there's any advantages/disadvantages of using either SFTP >-vs- SCP? I would say that depends on what software the clients want to use. FileZilla works nicely with sftp, and is available on Windows, OS X, and I presume other *nix platforms (I'm a CLI guy so only have used it enough to be sure it works). One can also use the sshfs to provide the ability to mount remote file systems over an ssh connection. This requires nothing on the file server side other than working ssh. I haven't tried this on FreeBSD. On Linux it requires kernel support of fuse, user level file system. There's no reason one couldn't use both sftp and scp/sshfs. We generally don't allow any ssh password access, but require authorized_keys. In a few cases where the client absolutely insists on allowing password authentication, we lock it down to a limited set of IP addresses. We have been able to get many clients to use OpenVPN to make their connections which makes life easier after the initial setup as all connections are through the OpenVPN tunnel so we don't have to allow outside ssh access. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206) 232-9186 Skype: jwccsllc (206) 855-5792 If you make yourselves sheep, the wolves will eat you -- Benjamin Franklin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Advantage -vs- Disadvantage: SFTP -vs- SCP
Gary, I agree...but I HAVE to give them access! :-) Ed ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
RE: Advantage -vs- Disadvantage: SFTP -vs- SCP
" My primary concern is overall security of the server (even if that means inconveniencing the end users)," Given your above statement, I would say the best option is to NOT connect it to any network at all - ESPECIALLY the internet! ;-) -Original Message- From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Ed Flecko Sent: Thursday, August 26, 2010 5:08 PM To: freebsd-questions@freebsd.org Subject: Advantage -vs- Disadvantage: SFTP -vs- SCP Hi folks, I have a server I'm building that is internet accessible and I'm wondering if there's any advantages/disadvantages of using either SFTP -vs- SCP? My primary concern is overall security of the server (even if that means inconveniencing the end users), and I'm wondering if one method might be better than the other? Comments??? Thank you, Ed ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" "This email is intended to be reviewed by only the intended recipient and may contain information that is privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any review, use, dissemination, disclosure or copying of this email and its attachments, if any, is strictly prohibited. If you have received this email in error, please immediately notify the sender by return email and delete this email from your system." ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Advantage -vs- Disadvantage: SFTP -vs- SCP
Hi folks, I have a server I'm building that is internet accessible and I'm wondering if there's any advantages/disadvantages of using either SFTP -vs- SCP? My primary concern is overall security of the server (even if that means inconveniencing the end users), and I'm wondering if one method might be better than the other? Comments??? Thank you, Ed ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: adding output lines to my .cshrc breaks sftp and scp ...
On Tue, 8 Jun 2010 16:41:54 -0700 (PDT), Goh Sanda wrote: > > > I added a few lines to the bottom of my standard FreeBSD .cshrc file: > > echo "" > w > echo "" > > Just to show me what is going on each time I log in. Use ~/.login for command that should be executed after you log in. The corresponding system-wide file is /etc/csh.login. > I don't understand why .cshrc output is breaking non-interactive > SSH file transfer. Because .cshrc is read (and that's why "executed") every time a shell is requested. > Is there a way to customize my .cshrc output while still retaining > scp/sftp functionality ? Simply use ~/.cshrc for settings, and ~/.login for "real" commands. A better explaination can be found in "man csh", let me quote: Startup and shutdown A login shell begins by executing commands from the system files /etc/csh.cshrc and /etc/csh.login. It then executes commands from files in the user's home directory: first ~/.tcshrc (+) or, if ~/.tcshrc is not found, ~/.cshrc, then ~/.history (or the value of the histfile shell variable), then ~/.login, and finally ~/.cshdirs (or the value of the dirsfile shell variable) (+). The shell may read /etc/csh.login before instead of after /etc/csh.cshrc, and ~/.login before instead of after ~/.tcshrc or ~/.cshrc and ~/.history, if so compiled; see the version shell variable. (+) Non-login shells read only /etc/csh.cshrc and ~/.tcshrc or ~/.cshrc on startup. For examples of startup files, please consult http://tcshrc.source- forge.net. Commands like stty(1) and tset(1), which need be run only once per login, usually go in one's ~/.login file. Users who need to use the same set of files with both csh(1) and tcsh can have only a ~/.cshrc which checks for the existence of the tcsh shell variable (q.v.) before using tcsh-specific commands, or can have both a ~/.cshrc and a ~/.tcshrc which sources (see the builtin command) ~/.cshrc. The rest of this manual uses `~/.tcshrc' to mean `~/.tcshrc or, if ~/.tcshrc is not found, ~/.cshrc'. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
adding output lines to my .cshrc breaks sftp and scp ...
I added a few lines to the bottom of my standard FreeBSD .cshrc file: echo "" w echo "" Just to show me what is going on each time I log in. The problem is, when I try to scp a file to the system, I get 'w' output echo'd to me, and no actual scp. sftp fails as well - I can no longer log in via sftp, and instead get this error: Received message too long 169882682 I don't understand why .cshrc output is breaking non-interactive SSH file transfer. Is there a way to customize my .cshrc output while still retaining scp/sftp functionality ? Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: chroot scp only network storage?
On Tue, May 25, 2010 11:23 pm, Balázs Mátéffy wrote: > Hello, > > > Try /usr/ports/shells/scponly . > > Look up the features, this way you can assign the restrictive scponly > shell > to the users: > > http://sublimation.org/scponly/wiki/index.php/Main_Page Thanks, I have used this before on linux. In this case it might not be exactly what I want. Thanks, Matt ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: chroot scp only network storage?
On Tue, May 25, 2010 11:05 pm, Matthew Seaman wrote: > Checkout the security/openssh-portable port which has options to enable > chroot'ing. You should be able to configure the account to only be able > to use scp(1) or sftp(1) by editing sshd_config or by using forced > commands in the user authorized_keys files. This sounds pretty close to what I want. I don't want the user to be able to get a shell on the box but do want to allow them to run a small subset of useful commands over ssh such as 'ls' and of course scp files to and from it. > Another alternative is WebDAV. Run it over HTTPS for security, and use > the standard Apache authn/authz controls to give each user access to > only their own area. In principle your users can mount their WebDAV > areas as networked filesystems on their desktops. In practice, this > works fine with MacOS X, is horribly buggy under Windows, needs quite a > lot of effort to make work on Linux, and I don't think it's actually > available at all on FreeBSD. However, commandline clients like cadaver > will work fine on anything Unixy. I've had problems with exactly this before on linux. I only need to allow linux, FreeBSD and Solaris users access to this resource so will persevere with something SSH based I think. Thanks, Matt. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: chroot scp only network storage?
Hello, Try /usr/ports/shells/scponly . Look up the features, this way you can assign the restrictive scponly shell to the users: http://sublimation.org/scponly/wiki/index.php/Main_Page Best Regards: Balázs Mátéffy On 26 May 2010 00:05, Matthew Seaman wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 25/05/2010 22:29:57, Matthew Law wrote: > > > > I want to provide some users with secure network attached storage over > > SCP. The intent is to provide people with a similar thing to, e.g. > > rsync.net but inside of our network only. > > > > Security is obviously a priority so I would like each user to be chrooted > > into their allocated directory and allow them only to execute a small set > > of commands. > > Checkout the security/openssh-portable port which has options to enable > chroot'ing. You should be able to configure the account to only be able > to use scp(1) or sftp(1) by editing sshd_config or by using forced > commands in the user authorized_keys files. > > > I have come across scponly before. Is this the best way of achieving > this > > with FreeBSD or is there some other better way? > > Another alternative is WebDAV. Run it over HTTPS for security, and use > the standard Apache authn/authz controls to give each user access to > only their own area. In principle your users can mount their WebDAV > areas as networked filesystems on their desktops. In practice, this > works fine with MacOS X, is horribly buggy under Windows, needs quite a > lot of effort to make work on Linux, and I don't think it's actually > available at all on FreeBSD. However, commandline clients like cadaver > will work fine on anything Unixy. > >Cheers > >Matthew > > - -- > Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard > Flat 3 > PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate > JID: matt...@infracaninophile.co.uk Kent, CT11 9PW > -BEGIN PGP SIGNATURE- > Version: GnuPG/MacGPG2 v2.0.14 (Darwin) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkv8ScYACgkQ8Mjk52CukIyLRQCginYWfMA2AJKnxZs9rvXlg7qf > CnUAnj668eKglbUe8RIfp8actDj13gYe > =jATZ > -END PGP SIGNATURE- > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscr...@freebsd.org" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: chroot scp only network storage?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 25/05/2010 22:29:57, Matthew Law wrote: > > I want to provide some users with secure network attached storage over > SCP. The intent is to provide people with a similar thing to, e.g. > rsync.net but inside of our network only. > > Security is obviously a priority so I would like each user to be chrooted > into their allocated directory and allow them only to execute a small set > of commands. Checkout the security/openssh-portable port which has options to enable chroot'ing. You should be able to configure the account to only be able to use scp(1) or sftp(1) by editing sshd_config or by using forced commands in the user authorized_keys files. > I have come across scponly before. Is this the best way of achieving this > with FreeBSD or is there some other better way? Another alternative is WebDAV. Run it over HTTPS for security, and use the standard Apache authn/authz controls to give each user access to only their own area. In principle your users can mount their WebDAV areas as networked filesystems on their desktops. In practice, this works fine with MacOS X, is horribly buggy under Windows, needs quite a lot of effort to make work on Linux, and I don't think it's actually available at all on FreeBSD. However, commandline clients like cadaver will work fine on anything Unixy. Cheers Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv8ScYACgkQ8Mjk52CukIyLRQCginYWfMA2AJKnxZs9rvXlg7qf CnUAnj668eKglbUe8RIfp8actDj13gYe =jATZ -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
chroot scp only network storage?
I want to provide some users with secure network attached storage over SCP. The intent is to provide people with a similar thing to, e.g. rsync.net but inside of our network only. Security is obviously a priority so I would like each user to be chrooted into their allocated directory and allow them only to execute a small set of commands. I have come across scponly before. Is this the best way of achieving this with FreeBSD or is there some other better way? Thanks in advance, Matt. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Copying files without scp
A. Wright wrote: > On Tue, 7 Apr 2009, Steve Bertrand wrote: > >> Can someone recommend a *known good* production quality copy mechanism >> that will act like scp, but without the overhead? rsh? nc? > > If you are happy with rsh authentication, then have you looked at > plain old rcp? I reviewed carefully all feedback I received, and since then, I loosely benchmarked my options. After all was said and done, using SSH, I found: - across the 100Mbps infrastructure, I could copy at 89Mbps - across the Gi infrastructure, I could copy at ~770Mbps My concern (I found) was coming from my Windows workstation. I was using a Windows binary version of SCP that is clearly lacking somewhere in the stack. FBSD to FBSD produced the above results. The 100Mb infrastructure hops one router and two switches, and the gig makes a hop across one edge router, a core router, and three switches. When I can get 75-90% line rate encrypted, I'll stay with that. I do appreciate all the feedback, as always ;) Steve ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Copying files without scp
To copy data from one server, I normally (always) use scp. man rcp ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Copying files without scp
Steve Bertrand wrote: > To copy data from one server, I normally (always) use scp. > > I'm looking for a method to perform this copy task without the overhead > of encryption for infrequent, high-volume transfers (hundreds to > thousands of GB). > > The data will be transferred server-to-server within a private datacentre. There are quite a lot of ways to do that. You could NFS-export then files and then use a tool to copy them on the other box locally (tar, cpio, cpdup, whatever). You could run an FTP server and then use one of the various FTP mirror tools to copy the files (e.g. ports/ftp/omi). You could use plain old rcp. You could apply this (trivial) patch that adds support for cipher "none" in ssh and scp: http://www.secnetix.de/olli/FreeBSD/patches/openssh-cipher-none The advantage of using scp (with "-c none") is that you can use all of the ssh features, such as key authentication, server aliases (via ~/.ssh/config) etc. You can also use other file copy tools (such as cpdup) that can be tunneled through ssh. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "IRIX is about as stable as a one-legged drunk with hypothermia in a four-hundred mile per hour wind, balancing on a banana peel on a greased cookie sheet -- when someone throws him an elephant with bad breath and a worse temper." -- Ralf Hildebrandt ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Copying files without scp
Steve Bertrand writes: > To copy data from one server, I normally (always) use scp. > > I'm looking for a method to perform this copy task without the overhead > of encryption for infrequent, high-volume transfers (hundreds to > thousands of GB). > > The data will be transferred server-to-server within a private datacentre. > > Can someone recommend a *known good* production quality copy mechanism > that will act like scp, but without the overhead? rsh? nc? > > I recall a thread not too long ago regarding this, but I'd like to have > a simple working example if possible, without getting into detail why > one shouldn't transfer data unencrypted. I haven't hit a case in years where the encryption overhead was actually measurable as a significant issue. Still, anything you can do over ssh can be done just as well over rsh. There's always rcp if you want the same syntax as scp, but if the data consists of a lot of different files, using tar on both ends of a pipe will probably be much faster. -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Copying files without scp
On Tue, 7 Apr 2009, Steve Bertrand wrote: Can someone recommend a *known good* production quality copy mechanism that will act like scp, but without the overhead? rsh? nc? If you are happy with rsh authentication, then have you looked at plain old rcp? A. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Copying files without scp
On Wednesday 08 April 2009 01:31:18 Steve Bertrand wrote: > Doug Hardie wrote: > > On Apr 7, 2009, at 16:13, Steve Bertrand wrote: > >> Hi all, > >> > >> To copy data from one server, I normally (always) use scp. > >> > >> I'm looking for a method to perform this copy task without the overhead > >> of encryption for infrequent, high-volume transfers (hundreds to > >> thousands of GB). > >> > >> The data will be transferred server-to-server within a private > >> datacentre. > >> > >> Can someone recommend a *known good* production quality copy mechanism > >> that will act like scp, but without the overhead? rsh? nc? > > > > In that environment you can use ftp just fine. Make sure to restrict it > > to the local IP addresses. > > Thanks, but I've never found a way to copy complete directories with FTP. > > I'll need to copy entire multi-nested directory structures. > > Do you have an example how to do this via FTP? (CLI-only). ftp/ncftp3: ncftpget -R ftp://servername/path/to/start/ -- Mel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Copying files without scp
Steve Bertrand wrote: Hi all, To copy data from one server, I normally (always) use scp. I'm looking for a method to perform this copy task without the overhead of encryption for infrequent, high-volume transfers (hundreds to thousands of GB). The data will be transferred server-to-server within a private datacentre. Can someone recommend a *known good* production quality copy mechanism that will act like scp, but without the overhead? rsh? nc? On the listening end: cd / ; nc -l 12345 | tar xpvf - On the sending end: cd / ; tar cf - /path/file | nc 12345 Replace 'x' by 't' on the listening end to verify that it's going to do what you would want/expect. -- Frederique ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Copying files without scp
Hi, > Can someone recommend a *known good* production quality copy mechanism > that will act like scp, but without the overhead? rsh? nc? I sometime use tar+rsh. Tar because I want to be sure to preserve all ownership and modes of the files and directories. Bests, olivier ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Copying files without scp
Chuck Swiger wrote: > On Apr 7, 2009, at 4:13 PM, Steve Bertrand wrote: >> I'm looking for a method to perform this copy task without the overhead >> of encryption for infrequent, high-volume transfers (hundreds to >> thousands of GB). >> >> The data will be transferred server-to-server within a private >> datacentre. >> >> Can someone recommend a *known good* production quality copy mechanism >> that will act like scp, but without the overhead? rsh? nc? > > Install /usr/ports/security/openssh-portable, and set the "Enable > HPN-SSH patch" option. You should then be able to use "scp -c none" > option, which is documented more fully here: > > http://www.psc.edu/networking/projects/hpn-ssh/none.php > > You could also use rsync + rsyncd Thanks Chuck, I think I'll just go the rsync route. I'm very familiar with it. I don't particularly want to install it on the boxes I'm concerned with momentarily, but I know how it works. Your other option seems intriguing, but I'd rather not install more software on these boxes if possible. I was hoping for a magical, don't have to install anything-type solution :) Perhaps I left out an important piece... even though I'm copying directory structures, in many cases the bulk of the data will be contained within massively large individual files. (Hence why rsync wasn't my original choice). Steve ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Copying files without scp
On Apr 7, 2009, at 4:13 PM, Steve Bertrand wrote: I'm looking for a method to perform this copy task without the overhead of encryption for infrequent, high-volume transfers (hundreds to thousands of GB). The data will be transferred server-to-server within a private datacentre. Can someone recommend a *known good* production quality copy mechanism that will act like scp, but without the overhead? rsh? nc? Install /usr/ports/security/openssh-portable, and set the "Enable HPN- SSH patch" option. You should then be able to use "scp -c none" option, which is documented more fully here: http://www.psc.edu/networking/projects/hpn-ssh/none.php You could also use rsync + rsyncd Regards, -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Copying files without scp
Doug Hardie wrote: > > On Apr 7, 2009, at 16:13, Steve Bertrand wrote: > >> Hi all, >> >> To copy data from one server, I normally (always) use scp. >> >> I'm looking for a method to perform this copy task without the overhead >> of encryption for infrequent, high-volume transfers (hundreds to >> thousands of GB). >> >> The data will be transferred server-to-server within a private >> datacentre. >> >> Can someone recommend a *known good* production quality copy mechanism >> that will act like scp, but without the overhead? rsh? nc? > > In that environment you can use ftp just fine. Make sure to restrict it > to the local IP addresses. Thanks, but I've never found a way to copy complete directories with FTP. I'll need to copy entire multi-nested directory structures. Do you have an example how to do this via FTP? (CLI-only). Steve ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Copying files without scp
On Apr 7, 2009, at 16:13, Steve Bertrand wrote: Hi all, To copy data from one server, I normally (always) use scp. I'm looking for a method to perform this copy task without the overhead of encryption for infrequent, high-volume transfers (hundreds to thousands of GB). The data will be transferred server-to-server within a private datacentre. Can someone recommend a *known good* production quality copy mechanism that will act like scp, but without the overhead? rsh? nc? In that environment you can use ftp just fine. Make sure to restrict it to the local IP addresses. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Copying files without scp
Steve Bertrand wrote: Hi all, To copy data from one server, I normally (always) use scp. I'm looking for a method to perform this copy task without the overhead of encryption for infrequent, high-volume transfers (hundreds to thousands of GB). The data will be transferred server-to-server within a private datacentre. Can someone recommend a *known good* production quality copy mechanism that will act like scp, but without the overhead? rsh? nc? I recall a thread not too long ago regarding this, but I'd like to have a simple working example if possible, without getting into detail why one shouldn't transfer data unencrypted. Steve ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" dump should work, it uses rsh. something like cpio could be piped into rsh obviously. You may want to benchmark it as I've had better transfer rates using scp/ssh but have not done it against rsh method. -- Adam Vandemore Systems Administrator IMED Mobility (605) 498-1610 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Copying files without scp
Hi all, To copy data from one server, I normally (always) use scp. I'm looking for a method to perform this copy task without the overhead of encryption for infrequent, high-volume transfers (hundreds to thousands of GB). The data will be transferred server-to-server within a private datacentre. Can someone recommend a *known good* production quality copy mechanism that will act like scp, but without the overhead? rsh? nc? I recall a thread not too long ago regarding this, but I'd like to have a simple working example if possible, without getting into detail why one shouldn't transfer data unencrypted. Steve ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Hashes in scp usernames (OpenSSH bug 472)
Christopher Key wrote: Hello, I've come upon OpenSSH bug 472, whereby scp refuses usernames containing a '#' character, dieing with 'invalid user name'. Both rsync and ssh accept such usernames, and after looking at /usr/src/crypto/openssh/scp.c, it would appear that scp also allows such usernames for the source, but not the destination. I've several questions: 1) Is there any specific reason why scp behaves like this, and specifically why does it only attempt to validate the destination user name and not the source? 2) Assuming it is safe to drop the username validation, I can quite happily modify the code as appropriate. However, I'm not sure how to rebuild and update with minimum fuss. I really only need to rebuild scp and install the new binary, can I do this easily without a full make buildworld; make installworld? 3) Assuming that there's no additional reason not to remove the username validation, how should I go about submitting a change request to get this modification made in CURRENT, and MFCed as appropriate? Kind Regards, Chris Key I don't know whether any of this is a good idea (there might be a very good reason why it is programmed this way, generally stuff in 'secure' is rather sensitive), but to answer your second question, you would simply do: # cd /usr/src/secure/usr.bin/scp # make # make install Since OpenSSH comes from OpenBSD, it may be worth trying asking someone over there too. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Hashes in scp usernames (OpenSSH bug 472)
Hello, I've come upon OpenSSH bug 472, whereby scp refuses usernames containing a '#' character, dieing with 'invalid user name'. Both rsync and ssh accept such usernames, and after looking at /usr/src/crypto/openssh/scp.c, it would appear that scp also allows such usernames for the source, but not the destination. I've several questions: 1) Is there any specific reason why scp behaves like this, and specifically why does it only attempt to validate the destination user name and not the source? 2) Assuming it is safe to drop the username validation, I can quite happily modify the code as appropriate. However, I'm not sure how to rebuild and update with minimum fuss. I really only need to rebuild scp and install the new binary, can I do this easily without a full make buildworld; make installworld? 3) Assuming that there's no additional reason not to remove the username validation, how should I go about submitting a change request to get this modification made in CURRENT, and MFCed as appropriate? Kind Regards, Chris Key ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: scp
On 22Oct08 22:14, kalin m wrote: }> I usually cheat and grab a copy of ssh-copy-id from the web; I suspect }> your issue has to do with permissions for the .ssh directory and the }> authorized_keys file. }permissions are 600 for the file and 700 for .ssh Permission of the remote user's home directory is another one to check. It can only be writable by the user. -- Callum Gibson @ home http://members.optusnet.com.au/callumgibson/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: scp
Polytropon wrote: On Thu, 23 Oct 2008 02:06:00 -0400, kalin m <[EMAIL PROTECTED]> wrote: grep sshd /var/log/messages | tail -20 i did that earlier.. the last record for sshd is from 10.14, more than a week ago What about /var/log/auth.log? Maybe this file gives some information... you were right Polytropon. ownership of the root directory for the user. it's not in home i was looking for something like sshd.log but it is auth.log.. thanks a lot to all now it's working... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: scp
On Thu, 23 Oct 2008 02:06:00 -0400, kalin m <[EMAIL PROTECTED]> wrote: > > grep sshd /var/log/messages | tail -20 > > > > i did that earlier.. the last record for sshd is from 10.14, more > than a week ago What about /var/log/auth.log? Maybe this file gives some information... -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: scp
Hi Kalin, Please try the following command, and let me know if you see any output from it. If so, please post it here. grep sshd /var/log/messages | tail -20 i did that earlier.. the last record for sshd is from 10.14, more than a week ago Regards, Greg -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkj/+h8ACgkQ0sRouByUApB/wwCeJyWSvft0FsU+5KJNCNgj6ybQ xeMAoIKSPU8tZ5G8pKkJakAUMzcq71wR =CweV -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: scp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 kalin m wrote: > >> Hi Kalin, >> >> Don't worry about that message - I see the same thing here with an ssh >> connection that succeeds. The "try pubkey" message displays a private >> key file. >> >> Did you check the sshd_config file on the server and the >> /var/log/messages file for additional hints? If you see anything >> interesting, please post the output here. Also make sure that >> PubkeyAuthentication is enabled ("on") in sshd_config. >> >> > thanks Greg... its actually > > PubkeyAuthentication yes > > it's the default > > there is nothing in the messages log. and i don't see any openssh logs.. > thanks... Hi Kalin, Please try the following command, and let me know if you see any output from it. If so, please post it here. grep sshd /var/log/messages | tail -20 Regards, Greg -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkj/+h8ACgkQ0sRouByUApB/wwCeJyWSvft0FsU+5KJNCNgj6ybQ xeMAoIKSPU8tZ5G8pKkJakAUMzcq71wR =CweV -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: scp
Hi Kalin, Don't worry about that message - I see the same thing here with an ssh connection that succeeds. The "try pubkey" message displays a private key file. Did you check the sshd_config file on the server and the /var/log/messages file for additional hints? If you see anything interesting, please post the output here. Also make sure that PubkeyAuthentication is enabled ("on") in sshd_config. thanks Greg... its actually PubkeyAuthentication yes it's the default there is nothing in the messages log. and i don't see any openssh logs.. thanks... Regards, Greg -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkj/63kACgkQ0sRouByUApAk/gCfTwdUyekSlWD2RFW1Bkmx57XH sbYAn0ArMnCOVybN/yomeu7XiOe+154f =MlC3 -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: scp
here is pretty much the same from another machine (os x laptop) with a dsa key: debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /private/var/root/.ssh/id_dsa (0x300e30) debug1: Authentications that can continue: publickey,password,keyboard-interactive debug3: start over, passed a different list publickey,password,keyboard-interactive debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Offering public key: /private/var/root/.ssh/id_dsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug1: Authentications that can continue: publickey,password,keyboard-interactive debug2: we did not send a packet, disable method <== * why didn't we?!? debug3: authmethod_lookup keyboard-interactive debug3: remaining preferred: password debug3: authmethod_is_enabled keyboard-interactive debug1: Next authentication method: keyboard-interactive debug2: userauth_kbdint debug2: we sent a keyboard-interactive packet, wait for reply debug1: Authentications that can continue: publickey,password,keyboard-interactive debug3: userauth_kbdint: disable: no info_req_seen debug2: we did not send a packet, disable method debug3: authmethod_lookup password debug3: remaining preferred: debug3: authmethod_is_enabled password debug1: Next authentication method: password kalin m wrote: with -vvv i get this below: . debug1: bits set: 1034/2048 debug1: ssh_dss_verify: signature correct debug1: kex_derive_keys debug1: newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: waiting for SSH2_MSG_NEWKEYS debug1: newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: done: ssh_kex2. debug1: send SSH2_MSG_SERVICE_REQUEST debug1: service_accept: ssh-userauth debug1: got SSH2_MSG_SERVICE_ACCEPT debug1: authentications that can continue: publickey,password,keyboard-interactive debug3: start over, passed a different list publickey,password,keyboard-interactive debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: next auth method to try is publickey debug1: try pubkey: id_rsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug1: authentications that can continue: publickey,password,keyboard-interactive debug2: we did not send a packet, disable method debug3: authmethod_lookup keyboard-interactive debug3: remaining preferred: password debug3: authmethod_is_enabled keyboard-interactive debug1: next auth method to try is keyboard-interactive debug2: userauth_kbdint debug2: we sent a keyboard-interactive packet, wait for reply debug1: authentications that can continue: publickey,password,keyboard-interactive debug3: userauth_kbdint: disable: no info_req_seen debug2: we did not send a packet, disable method debug3: authmethod_lookup password debug3: remaining preferred: debug3: authmethod_is_enabled password debug1: next auth method to try is password after this i get the password prompt why does it say try pubkey: id_rsa when id_rsa is supposed to be the private key? ?!?! Greg Larkin wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 kalin m wrote: hi all... i need to do a script to copy a file from a remote machine via scp with a key and without a password here is what i'm doing: 1. ssh-keygen -t rsa 2. scp new_key.pub to [EMAIL PROTECTED] (with password) 3. on remote_host rename new_key.pub to ~user/.ssh/athorized_keys when i try: # scp [EMAIL PROTECTED]:/files/file file i get password prompt... what am i missing?!? Hi Kalin, Here are a few things to try and check: - - Run scp with the "-vvv" flag to enable very verbose output. You may see something in the log messages during the connection phase that expose the problem. - - Check the /var/log/messages file on the host for debug messages from sshd. Are there any errors that indicate why public key authentication doesn't work? - - Check the /etc/ssh/sshd_config file contents. Is PubkeyAuthentication enabled? You can also change the LogLevel setting if you need more information emitted to /var/log/messages. Don't forget to send SIGHUP to sshd whenever you change sshd_config. - - Check the permissions on the the ~user/.ssh directory and the authorized_keys file. They have to be sufficiently tight (700 and 600, typically). Hope that helps, and post back here with any further questions. Regards, Greg Larkin -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://eni
Re: scp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 kalin m wrote: > > with -vvv i get this below: > > . > debug1: bits set: 1034/2048 > debug1: ssh_dss_verify: signature correct > debug1: kex_derive_keys > debug1: newkeys: mode 1 > debug1: SSH2_MSG_NEWKEYS sent [...] > > after this i get the password prompt > > why does it say try pubkey: id_rsa when id_rsa is supposed to be the > private key? > > ?!?! > > Hi Kalin, Don't worry about that message - I see the same thing here with an ssh connection that succeeds. The "try pubkey" message displays a private key file. Did you check the sshd_config file on the server and the /var/log/messages file for additional hints? If you see anything interesting, please post the output here. Also make sure that PubkeyAuthentication is enabled ("on") in sshd_config. Regards, Greg -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkj/63kACgkQ0sRouByUApAk/gCfTwdUyekSlWD2RFW1Bkmx57XH sbYAn0ArMnCOVybN/yomeu7XiOe+154f =MlC3 -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: scp
with -vvv i get this below: . debug1: bits set: 1034/2048 debug1: ssh_dss_verify: signature correct debug1: kex_derive_keys debug1: newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: waiting for SSH2_MSG_NEWKEYS debug1: newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: done: ssh_kex2. debug1: send SSH2_MSG_SERVICE_REQUEST debug1: service_accept: ssh-userauth debug1: got SSH2_MSG_SERVICE_ACCEPT debug1: authentications that can continue: publickey,password,keyboard-interactive debug3: start over, passed a different list publickey,password,keyboard-interactive debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: next auth method to try is publickey debug1: try pubkey: id_rsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug1: authentications that can continue: publickey,password,keyboard-interactive debug2: we did not send a packet, disable method debug3: authmethod_lookup keyboard-interactive debug3: remaining preferred: password debug3: authmethod_is_enabled keyboard-interactive debug1: next auth method to try is keyboard-interactive debug2: userauth_kbdint debug2: we sent a keyboard-interactive packet, wait for reply debug1: authentications that can continue: publickey,password,keyboard-interactive debug3: userauth_kbdint: disable: no info_req_seen debug2: we did not send a packet, disable method debug3: authmethod_lookup password debug3: remaining preferred: debug3: authmethod_is_enabled password debug1: next auth method to try is password after this i get the password prompt why does it say try pubkey: id_rsa when id_rsa is supposed to be the private key? ?!?! Greg Larkin wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 kalin m wrote: hi all... i need to do a script to copy a file from a remote machine via scp with a key and without a password here is what i'm doing: 1. ssh-keygen -t rsa 2. scp new_key.pub to [EMAIL PROTECTED] (with password) 3. on remote_host rename new_key.pub to ~user/.ssh/athorized_keys when i try: # scp [EMAIL PROTECTED]:/files/file file i get password prompt... what am i missing?!? Hi Kalin, Here are a few things to try and check: - - Run scp with the "-vvv" flag to enable very verbose output. You may see something in the log messages during the connection phase that expose the problem. - - Check the /var/log/messages file on the host for debug messages from sshd. Are there any errors that indicate why public key authentication doesn't work? - - Check the /etc/ssh/sshd_config file contents. Is PubkeyAuthentication enabled? You can also change the LogLevel setting if you need more information emitted to /var/log/messages. Don't forget to send SIGHUP to sshd whenever you change sshd_config. - - Check the permissions on the the ~user/.ssh directory and the authorized_keys file. They have to be sufficiently tight (700 and 600, typically). Hope that helps, and post back here with any further questions. Regards, Greg Larkin -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkj/2NQACgkQ0sRouByUApD3jACgnHA1h6XmnOuAEQXsnBjCcZBZ /k8An2AIMx4CJSXuTDfrPCcBlb9rLFqA =9z7a -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: scp
Jay Chandler wrote: On Oct 22, 2008, at 6:40 PM, kalin m wrote: hi all... i need to do a script to copy a file from a remote machine via scp with a key and without a password here is what i'm doing: 1. ssh-keygen -t rsa 2. scp new_key.pub to [EMAIL PROTECTED] (with password) 3. on remote_host rename new_key.pub to ~user/.ssh/athorized_keys Should be authorized_keys. it is. i just misspelled it in the message... I usually cheat and grab a copy of ssh-copy-id from the web; I suspect your issue has to do with permissions for the .ssh directory and the authorized_keys file. permissions are 600 for the file and 700 for .ssh the users are different on the local machine and remote_host. my guess is that if i point to the right key with -i it should work correct... now doing -vvv as Greg Larkin suggests... thanks... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: scp
On Oct 22, 2008, at 6:40 PM, kalin m wrote: hi all... i need to do a script to copy a file from a remote machine via scp with a key and without a password here is what i'm doing: 1. ssh-keygen -t rsa 2. scp new_key.pub to [EMAIL PROTECTED] (with password) 3. on remote_host rename new_key.pub to ~user/.ssh/athorized_keys Should be authorized_keys. I usually cheat and grab a copy of ssh-copy-id from the web; I suspect your issue has to do with permissions for the .ssh directory and the authorized_keys file. -- Jay Chandler / KB1JWQ Living Legend / Systems Exorcist Today's Excuse: Budget cuts ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: scp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 kalin m wrote: > hi all... > > i need to do a script to copy a file from a remote machine via scp with > a key and without a password > > here is what i'm doing: > > 1. ssh-keygen -t rsa > 2. scp new_key.pub to [EMAIL PROTECTED] (with password) > 3. on remote_host rename new_key.pub to ~user/.ssh/athorized_keys > > when i try: > # scp [EMAIL PROTECTED]:/files/file file > > i get password prompt... > > what am i missing?!? > Hi Kalin, Here are a few things to try and check: - - Run scp with the "-vvv" flag to enable very verbose output. You may see something in the log messages during the connection phase that expose the problem. - - Check the /var/log/messages file on the host for debug messages from sshd. Are there any errors that indicate why public key authentication doesn't work? - - Check the /etc/ssh/sshd_config file contents. Is PubkeyAuthentication enabled? You can also change the LogLevel setting if you need more information emitted to /var/log/messages. Don't forget to send SIGHUP to sshd whenever you change sshd_config. - - Check the permissions on the the ~user/.ssh directory and the authorized_keys file. They have to be sufficiently tight (700 and 600, typically). Hope that helps, and post back here with any further questions. Regards, Greg Larkin -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkj/2NQACgkQ0sRouByUApD3jACgnHA1h6XmnOuAEQXsnBjCcZBZ /k8An2AIMx4CJSXuTDfrPCcBlb9rLFqA =9z7a -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
scp
hi all... i need to do a script to copy a file from a remote machine via scp with a key and without a password here is what i'm doing: 1. ssh-keygen -t rsa 2. scp new_key.pub to [EMAIL PROTECTED] (with password) 3. on remote_host rename new_key.pub to ~user/.ssh/athorized_keys when i try: # scp [EMAIL PROTECTED]:/files/file file i get password prompt... what am i missing?!? thanks ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: rsync or even scp questions....
> How, may I ask, does this work? If you search the bash man file you can find this and lots of other useful constructs, search for 'Parameter Expansion' - I'm not sure how much of this relates to other Bourne Shell derivatives, but I don't imagine it would be difficult to test it out. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: rsync or even scp questions....
On Sun, Oct 12, 2008 at 01:49:31AM -0700, Jeremy Chadwick wrote: > On Sun, Oct 12, 2008 at 09:42:38AM +0100, Matthew Seaman wrote: > > mdh wrote: > >> --- On Sat, 10/11/08, Gary Kline <[EMAIL PROTECTED]> wrote: > >>> On the Ubuntu computer I am /home/kline; on my main > >>> computer, > >>> my home is /usr/home/kline. The following sh script > >>> worked > >>> perfected when my home on "tao" [FBSD] was > >>> /home/kline: > >>> > >>> P > >>> #!/bin/sh > >>> > >>> PWD=`pwd`; > >>> echo "This directory is [${PWD}]"; > >>> > >>> scp -qrp ${PWD}/* ethos:/${PWD} > >>> ###/usr/bin/scp -rqp -i /home/kline/.ssh/zeropasswd-id > >>> ${PWD}/* \ klin > >>> [EMAIL PROTECTED]:/${PWD} > >>> > >>> Question #1: is there any /bin/sh method of getting rid of > >>> the > >>> "/usr"? I switch off between my two computers > >>> especially when > >>> get mucked up, as with my upgrade to kde4. (Otherwise, I > >>> do > >>> backups of ~kline as well as other critical directories.) > >>> > >>> Is there a way of automatically using rsync rather that my > >>> kwik-and-dirty /bin/shell script? > >>> > >>> thanks, people, > >>> > >>> gary > >> > >> If what you wish to do is simply get rid of /usr in a string, you can use > >> sed like so: > >> varWithoutUsr=`echo ${varWithUsr} |sed -e 's/\/usr//'` > >> After running this, where $varWithUsr is the variable containing a > >> string like "/usr/home/blah", the variable $varWithoutUsr will be equal > >> to "/home/blah". I create simple scripts like this all the time to > >> rename batches of files, for example. > >> > >> The easier way is probably just to not specify a dir to scp's remote > >> path though, since it defaults to the user's home directory. > > > > Or, in anything resembling Bourne shell: > > > > varWithoutUsr=${varWithUsr#/usr} > > And I'll take a moment to recommend Matthew's method, since it does not > involve fork()ing an additional process. > > When writing shell scripts in general, it's best if you can avoid > spawning external processes for things which can be done easily > (keyword: easily!) within Bourne natively. There's no harm in doing it > for more complex things, but fork() is somewhat expensive, and try to > imagine what will happen to those scripts if the system lacks process > table space, etc... :-) Best to try and make everything > "self-contained" if possible. right; esp'ly since i'll be running at least two scripts daily-- at a min. besides, the simpler /bin/sh script is something i use to save code or prose just in case the sky falls! ah, no wonder this is the best list in the {known} universe > > -- > | Jeremy Chadwickjdc at parodius.com | > | Parodius Networking http://www.parodius.com/ | > | UNIX Systems Administrator Mountain View, CA, USA | > | Making life hard for others since 1977. PGP: 4BD6C0CB | > -- Gary Kline [EMAIL PROTECTED] http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: rsync or even scp questions....
On Sun, Oct 12, 2008 at 09:42:38AM +0100, Matthew Seaman wrote: > mdh wrote: > >--- On Sat, 10/11/08, Gary Kline <[EMAIL PROTECTED]> wrote: > >>On the Ubuntu computer I am /home/kline; on my main > >>computer, > >>my home is /usr/home/kline. The following sh script > >>worked > >>perfected when my home on "tao" [FBSD] was > >>/home/kline: > >> > >>P > >>#!/bin/sh > >> > >>PWD=`pwd`; > >>echo "This directory is [${PWD}]"; > >> > >>scp -qrp ${PWD}/* ethos:/${PWD} > >>###/usr/bin/scp -rqp -i /home/kline/.ssh/zeropasswd-id > >>${PWD}/* \ klin > >>[EMAIL PROTECTED]:/${PWD} > >> > >>Question #1: is there any /bin/sh method of getting rid of > >>the > >>"/usr"? I switch off between my two computers > >>especially when > >>get mucked up, as with my upgrade to kde4. (Otherwise, I > >>do > >>backups of ~kline as well as other critical directories.) > >> > >>Is there a way of automatically using rsync rather that my > >>kwik-and-dirty /bin/shell script? > >> > >>thanks, people, > >> > >>gary > > > >If what you wish to do is simply get rid of /usr in a string, you can use > >sed like so: > >varWithoutUsr=`echo ${varWithUsr} |sed -e 's/\/usr//'` > >After running this, where $varWithUsr is the variable containing a string > >like "/usr/home/blah", the variable $varWithoutUsr will be equal to > >"/home/blah". I create simple scripts like this all the time to rename > >batches of files, for example. > >The easier way is probably just to not specify a dir to scp's remote path > >though, since it defaults to the user's home directory. > > Or, in anything resembling Bourne shell: > > varWithoutUsr=${varWithUsr#/usr} I'll be damrned! It works--I've used the zsh for almost 20 years; it's a ksh clone++. How, may I ask, does this work? (I've seen ksh chopping from the RHS; I wrote a short C util to axe any part of a string, but have never seen *this* voodoo. LOL++) In any event, merci infiniement! gary PS: this will save my rsync scripts too. > > Cheers, > > Matthew > > -- > Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard > Flat 3 > PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate > Kent, CT11 9PW > -- Gary Kline [EMAIL PROTECTED] http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: rsync or even scp questions....
On Sun, Oct 12, 2008 at 09:42:38AM +0100, Matthew Seaman wrote: > mdh wrote: >> --- On Sat, 10/11/08, Gary Kline <[EMAIL PROTECTED]> wrote: >>> On the Ubuntu computer I am /home/kline; on my main >>> computer, >>> my home is /usr/home/kline. The following sh script >>> worked >>> perfected when my home on "tao" [FBSD] was >>> /home/kline: >>> >>> P >>> #!/bin/sh >>> >>> PWD=`pwd`; >>> echo "This directory is [${PWD}]"; >>> >>> scp -qrp ${PWD}/* ethos:/${PWD} >>> ###/usr/bin/scp -rqp -i /home/kline/.ssh/zeropasswd-id >>> ${PWD}/* \ klin >>> [EMAIL PROTECTED]:/${PWD} >>> >>> Question #1: is there any /bin/sh method of getting rid of >>> the >>> "/usr"? I switch off between my two computers >>> especially when >>> get mucked up, as with my upgrade to kde4. (Otherwise, I >>> do >>> backups of ~kline as well as other critical directories.) >>> >>> Is there a way of automatically using rsync rather that my >>> kwik-and-dirty /bin/shell script? >>> >>> thanks, people, >>> >>> gary >> >> If what you wish to do is simply get rid of /usr in a string, you can use >> sed like so: >> varWithoutUsr=`echo ${varWithUsr} |sed -e 's/\/usr//'` >> After running this, where $varWithUsr is the variable containing a >> string like "/usr/home/blah", the variable $varWithoutUsr will be equal >> to "/home/blah". I create simple scripts like this all the time to >> rename batches of files, for example. >> >> The easier way is probably just to not specify a dir to scp's remote >> path though, since it defaults to the user's home directory. > > Or, in anything resembling Bourne shell: > > varWithoutUsr=${varWithUsr#/usr} And I'll take a moment to recommend Matthew's method, since it does not involve fork()ing an additional process. When writing shell scripts in general, it's best if you can avoid spawning external processes for things which can be done easily (keyword: easily!) within Bourne natively. There's no harm in doing it for more complex things, but fork() is somewhat expensive, and try to imagine what will happen to those scripts if the system lacks process table space, etc... :-) Best to try and make everything "self-contained" if possible. -- | Jeremy Chadwickjdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: rsync or even scp questions....
mdh wrote: --- On Sat, 10/11/08, Gary Kline <[EMAIL PROTECTED]> wrote: On the Ubuntu computer I am /home/kline; on my main computer, my home is /usr/home/kline. The following sh script worked perfected when my home on "tao" [FBSD] was /home/kline: P #!/bin/sh PWD=`pwd`; echo "This directory is [${PWD}]"; scp -qrp ${PWD}/* ethos:/${PWD} ###/usr/bin/scp -rqp -i /home/kline/.ssh/zeropasswd-id ${PWD}/* \ klin [EMAIL PROTECTED]:/${PWD} Question #1: is there any /bin/sh method of getting rid of the "/usr"? I switch off between my two computers especially when get mucked up, as with my upgrade to kde4. (Otherwise, I do backups of ~kline as well as other critical directories.) Is there a way of automatically using rsync rather that my kwik-and-dirty /bin/shell script? thanks, people, gary If what you wish to do is simply get rid of /usr in a string, you can use sed like so: varWithoutUsr=`echo ${varWithUsr} |sed -e 's/\/usr//'` After running this, where $varWithUsr is the variable containing a string like "/usr/home/blah", the variable $varWithoutUsr will be equal to "/home/blah". I create simple scripts like this all the time to rename batches of files, for example. The easier way is probably just to not specify a dir to scp's remote path though, since it defaults to the user's home directory. Or, in anything resembling Bourne shell: varWithoutUsr=${varWithUsr#/usr} Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: rsync or even scp questions....
--- On Sat, 10/11/08, Gary Kline <[EMAIL PROTECTED]> wrote: > On the Ubuntu computer I am /home/kline; on my main > computer, > my home is /usr/home/kline. The following sh script > worked > perfected when my home on "tao" [FBSD] was > /home/kline: > > P > #!/bin/sh > > PWD=`pwd`; > echo "This directory is [${PWD}]"; > > scp -qrp ${PWD}/* ethos:/${PWD} > ###/usr/bin/scp -rqp -i /home/kline/.ssh/zeropasswd-id > ${PWD}/* \ klin > [EMAIL PROTECTED]:/${PWD} > > Question #1: is there any /bin/sh method of getting rid of > the > "/usr"? I switch off between my two computers > especially when > get mucked up, as with my upgrade to kde4. (Otherwise, I > do > backups of ~kline as well as other critical directories.) > > Is there a way of automatically using rsync rather that my > kwik-and-dirty /bin/shell script? > > thanks, people, > > gary If what you wish to do is simply get rid of /usr in a string, you can use sed like so: varWithoutUsr=`echo ${varWithUsr} |sed -e 's/\/usr//'` After running this, where $varWithUsr is the variable containing a string like "/usr/home/blah", the variable $varWithoutUsr will be equal to "/home/blah". I create simple scripts like this all the time to rename batches of files, for example. The easier way is probably just to not specify a dir to scp's remote path though, since it defaults to the user's home directory. - mdh ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
rsync or even scp questions....
I have two "desktop" computers; three, if you count my new ThinkPad. The TPad needs a new CAT5 cable, so for now I'm only considereing the two tower computers. On the Ubuntu computer I am /home/kline; on my main computer, my home is /usr/home/kline. The following sh script worked perfected when my home on "tao" [FBSD] was /home/kline: P #!/bin/sh PWD=`pwd`; echo "This directory is [${PWD}]"; scp -qrp ${PWD}/* ethos:/${PWD} ###/usr/bin/scp -rqp -i /home/kline/.ssh/zeropasswd-id ${PWD}/* \ klin [EMAIL PROTECTED]:/${PWD} Question #1: is there any /bin/sh method of getting rid of the "/usr"? I switch off between my two computers especially when get mucked up, as with my upgrade to kde4. (Otherwise, I do backups of ~kline as well as other critical directories.) Is there a way of automatically using rsync rather that my kwik-and-dirty /bin/shell script? thanks, people, gary PS: Complete disclosure: it works one way [tao to ethos] because I have created a /usr/home/kline/* tree on ethos. PPS: if this seems like a numbskull query, i only caught a few hours sleep last night! -- Gary Kline [EMAIL PROTECTED] http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: scp/sftp without interactive shell?
Ewald Jenisch wrote: Hi, I'm looking for a way to securely transfer files between machines using either scp or sftp without giving the user a login shell on the target machine. Have you tried ports/shells/scponly? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: scp/sftp without interactive shell?
Hello Ewald, Thursday, May 3, 2007, 5:07:33 PM, you wrote: > Hi, > I'm looking for a way to securely transfer files between machines > using either scp or sftp without giving the user a login shell on the > target machine. Put in another way: The user should be able to > transfer files but must not have an interactive login shell on the > target box. > Giving the user a shell of "/bin/true" or something similar on the > target machine is not an option since scp doesn't seem to work in this > case. > Any ideas how this could be accomplished? > Thanks in advance for your help, > -ewald Given your requirement, i would suggest installing pure-ftpd and puredb (from ports). With that you can create as many virtual users as you like, and restrict access/speed/etc to fit your needs. Your clients will connect over SSL FTP, which i assume is acceptable. A detailed guide is here: http://www.bsdguides.org/guides/freebsd/networking/pure-ftpd_virtual_users.php Hope this helps. -- Best regards, Ghirai. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: scp/sftp without interactive shell?
Ewald Jenisch wrote: [ ... ] Giving the user a shell of "/bin/true" or something similar on the target machine is not an option since scp doesn't seem to work in this case. Any ideas how this could be accomplished? Take a look at /usr/ports/shells/scponly, or "rsh" for "restricted shells", more generally. -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"