[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Transferring files over SSH in the console



>>   As others have commented, you can use scp or sftp.
>>
>>   However, I can imagine that embedded might not have the
>> sftp service or the scp executable.
>>
>>   If that's your case, you can always do:
>>
>> # cat file | ssh remote 'cat > destinaton'
>
>  Pardon my replying to myself, but I've now seen a bunch of the
> rest of the thread, and it seems to me that, if the set of commands
> you want to do is repeatable, then maybe what you want is to do
> most of the remote-system operations through SSH commands this way?
>
>  Someone else may have already suggested this, but something
> like:
>
> # cat file.tgz | ssh remote 'cat > dest.tgz' (or scp, if available)
> # ssh remote 'tar -xf dest.tgz'
> # ssh remote 'sh dest/installer' (or whatever)
> # ssh remote 'cat dest/install-log' > remote-install-log  (or whatever)
>
>  This way, you still only have the one shell, and/but you
> pay the price in having to prefix all the remote operations
> with "ssh remote".  However, you could script this on the
> local system (which is, I think, why you want a single
> session, right, so you can script it?), and then the extra
> typing doesn't really cost you much.
>

Thanks for the idea, Andrew, but I'm actually not scripting this.
Right now I have two windows open: one for sftp and one for shell
commands. I was hoping to save myself the trouble of switching
windows, keeping the cd in sync, etc, with something that supports
both sftp commands and ssh commands. I don't want to increase my
workload by prefixing all the commands.

-- 
Dotan Cohen

http://bido.com
http://what-is-what.com


Reply to: