Re: Transferring files over SSH in the console

2010-04-01 Thread Tzafrir Cohen
On Mon, Mar 22, 2010 at 01:02:10AM +0200, Dotan Cohen wrote:
 On 22 March 2010 00:57, Selçuk Mıynat selcukmiy...@gmail.com wrote:
  On Mon, Mar 22, 2010 at 00:52, Dotan Cohen dotanco...@gmail.com wrote:
  I am managing a small embedded device that I SSH into over the LAN. To
  run commands, I use KDE Konsole, and to transfer files I use Konqueror
  and SFTP. I understand that SFTP also runs over SSH, so is there a way
  to send files in Konsole as well? I am familiar with the FTP commands
  such as cd, lcd, put, and get. Are there equivalent commands for SSH
  terminal connections?
 
  Are you looking for scp?
 
  http://en.wikipedia.org/wiki/Secure_copy
  http://www.helpdesk.umd.edu/documents/4/4801/
 
 
 No, scp is for sending files to a remote machine that the user has yet
 to connect to:
 localhost$ scp /path/to/file.txt u...@remotemachine /remote/path/

(wrong syntax: scp /path/to/file.txt u...@remotemachine:/remote/path/ )

While this is not what you asked for, I still prefer scp.
scp can be made much more convinient to use, once you allow tab
completion of remote file names.

 scp file.txt u...@remotemachine:/remtab

This works if you cna login without a password to u...@remotemachine .
There are several ways to do that:

1. Passphrase-less key
2. key + ssh-agent

I suppose people in this list are familiar with the above two. The
down-sides with those two are:

1. They still require estabilishng an extra SSH connection per pressing
of tab.
2. They may require extra setup on remoteMachine.

Luckily openssh provides a better alternative. In my .ssh/config I have:

Host *
ControlMaster = auto
ControlPath = ~/.ssh/socket/control_%h__%p__%r__%l

This means that whenever I connect to a new host, ssh creates a socket
that allows multiplexing new ssh connections on the already-established
SSH connection. After-all the SSH protocol was designed to support
multiple streams (for e.g. port forwarding).

With this set, scp works nice and fast to a remote host. BTW: it seems
that in squeeze rsync now has the same sort of completion.

As usual, I rely on the shell's history to provide me some sort of
context. I usually also copy pathes from a remote shell window on the
target system.

-- 
Tzafrir Cohen | tzaf...@jabber.org | VIM is
http://tzafrir.org.il || a Mutt's
tzaf...@cohens.org.il ||  best
ICQ# 16849754 || friend


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100401131417.gs16...@pear.tzafrir.org.il



Re: Transferring files over SSH in the console

2010-04-01 Thread Sjoerd Hardeman

Tzafrir Cohen schreef:

While this is not what you asked for, I still prefer scp.
scp can be made much more convinient to use, once you allow tab
completion of remote file names.

 scp file.txt u...@remotemachine:/remtab

This works if you cna login without a password to u...@remotemachine .
There are several ways to do that:

1. Passphrase-less key
2. key + ssh-agent

I suppose people in this list are familiar with the above two. The
down-sides with those two are:

1. They still require estabilishng an extra SSH connection per pressing
of tab.
2. They may require extra setup on remoteMachine.

Luckily openssh provides a better alternative. In my .ssh/config I have:

Host *
ControlMaster = auto
ControlPath = ~/.ssh/socket/control_%h__%p__%r__%l

This means that whenever I connect to a new host, ssh creates a socket
that allows multiplexing new ssh connections on the already-established
SSH connection. After-all the SSH protocol was designed to support
multiple streams (for e.g. port forwarding).

With this set, scp works nice and fast to a remote host. BTW: it seems
that in squeeze rsync now has the same sort of completion.

As usual, I rely on the shell's history to provide me some sort of
context. I usually also copy pathes from a remote shell window on the
target system.

Thanks, this is very neat ;)



signature.asc
Description: OpenPGP digital signature


Re: Transferring files over SSH in the console

2010-03-23 Thread Johann Spies
On Mon, Mar 22, 2010 at 12:52:36AM +0200, Dotan Cohen wrote:
 I am managing a small embedded device that I SSH into over the LAN. To
 run commands, I use KDE Konsole, and to transfer files I use Konqueror
 and SFTP. I understand that SFTP also runs over SSH, so is there a way
 to send files in Konsole as well? I am familiar with the FTP commands
 such as cd, lcd, put, and get. Are there equivalent commands for SSH
 terminal connections?

Several ways:

* You can use scp both ways as others have said.
* Use rsync over ssh: rsync -e ssh -av user@remote:directory/files .
* Use lftp fish://user@remote  and then you can put,mput, get,mget and
  much more
* Do the same with gftp (using an ssh/fish-connection)
* Use filezilla like gftp

Regards
Johann
-- 
Johann Spies  Telefoon: 021-808 4599
Informasietegnologie, Universiteit van Stellenbosch

 Jesus said unto her, I am the resurrection, and the 
  life: he that believeth in me, though he were dead, 
  yet shall he live: And whosoever liveth and believeth 
  in me shall never die. Believest thou this?
 John 11:25,26 


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100323073726.gg11...@sun.ac.za



Re: Transferring files over SSH in the console

2010-03-22 Thread Dotan Cohen
   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


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003220152p3c8d50e1le80fe6bab5522...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-22 Thread Dotan Cohen
 You are getting many responses, so perhaps this idea has already been
 rejected, however --- I use ssh AND sshfs. I get shell access to the
 remote machine with ssh and for file access I mount the portion of the
 remote fs that a want on a local mount point. I know there are a lot
 of machinations going on under the covers, but it does work. Put the
 mount point in your home directory. If you can ssh to root on the remote,
 you can also get root access to the remote file system.

 It works for me.


Yes, Paul, and it what I am currently doing. However, I want to have
it all in one window and have the pwds in sync.

-- 
Dotan Cohen

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003220153t4136ca99qebe3b796707a3...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-22 Thread Dotan Cohen
 I can have as many open connections as I want, it's on the LAN. But I
 would _prefer_ just one terminal window for both commands (SSH) and
 file transfers.

 First of all, I believe the ssh protocol (not necessarily the ssh
 program) already support exactly what you want: logging in and, if you
 want, sending files through the already opened tunnel.


Exactly! The protocol obviously supports this as both sftp and the
shell are over the same ssh protocol. That is why I thought that this
ability might exist.


 PuTTY does exactly that. If you are logged in, you can press a button to
 open a (local) file browser for the remote files. Without new password
 entering. So I guess it uses the same tunnel.


I see, then it is already in the right pwd. I'd still prefer to keep
it all in one window but I will play with Putty. Thanks.


 So here's your first solution: use putty. It exists for Linux also.

 Second solution: if the ssh protocol supports what you want but the ssh
 program does not, then complain to whoever maintains ssh (program) to
 include that option. For example, a hotkey to switch it into sftp mode
 in the already open connection.


That would be more of a feature request than a complaint. I suppose
that OpenSSH might be the project to file the feature request to. I'll
get on that.


 More solutions (sshfs, or just giving up and typing several commands)
 have already been posted here.

Many workarounds, but the solution seems to be to file a feature
request with OpenSSH. Thanks.


-- 
Dotan Cohen

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003220158m2153c00av3ba5c7075e5f1...@mail.gmail.com



Re: Re: Transferring files over SSH in the console

2010-03-22 Thread Clive Standbridge
 I can have as many open connections as I want, it's on the LAN. But I
 would _prefer_ just one terminal window for both commands (SSH) and
 file transfers.


You might like to try this.

1) Add to ~/.ssh/config
ControlMaster auto
ControlPath /tmp/%h%p%r
(man ssh_config for explanation).

2) Fire up sftp
sftp u...@machine:/path

3) Within sftp, login to a shell on the remote system
!ssh u...@machine
Exit the shell to return to the sftp prompt.

4) Use sftp's history to recall the ssh command as desired.

Note that by using the control socket, the shell login uses the same
connection as sftp. Consequently you don't have to enter the password
again.

Allow me to make a plug for the lftp package which I find more
friendly and flexible than sftp (filename completion, get/put multiple
files, and much more). 
At (2) enter
lftp sftp://u...@machine/path
then carry on as before.

I hope this helps.

-- 
Cheers,
Clive


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100322094946.ga7...@rimmer.esmertec.com



Re: Transferring files over SSH in the console

2010-03-22 Thread Tony Nelson
On 10-03-21 18:52:36, Dotan Cohen wrote:
 I am managing a small embedded device that I SSH into over the LAN. 
 To run commands, I use KDE Konsole, and to transfer files I use 
 Konqueror and SFTP. I understand that SFTP also runs over SSH, so is 
 there a way to send files in Konsole as well? I am familiar with the 
 FTP commands such as cd, lcd, put, and get. Are there equivalent 
 commands for SSH terminal connections?

Though your request is reasonable, I believe one can not bothe have a 
terminal and transfer files using OpenSSH's ssh command.  There might 
be something possible with port forwarding, and perhaps an escape could 
be added to ssh to provide access to the sftp subsystem, but what I 
always do is just do the transfer separately, as you do, and keep track 
of the CWD myself.

Transfers can be done from the same terminal by backgrounding the ssh 
connection and then using sftp or scp.  In ssh and bash (see ESCAPE 
CHARACTERS in `man ssh` and JOB CONTROL in `man bash`):

[ ~]# ll mime.py 
-rw-r--r-- 1 root root 16782 May 18  2009 mime.py
[ ~]# ~^Z [suspend ssh]

[1]+  Stopped ssh r...@foo.com
[to...@localhost ~]$ ll mime.py
ls: cannot access mime.py: No such file or directory
[to...@localhost ~]$ scp r...@foo.com:mime.py .
mime.py 
100%   16KB  16.4KB/s   00:01
[to...@localhost ~]$ fg
ssh r...@foo.com

[r...@rapidxen ~]# 

You can keep sftp running and switch back and forth by ^Z out of sftp 
and fg %- to go back to the other job, ssh.  Use the up arrow into 
command history to avoid even typing fg %-.

Or, you could always use sftp or scp from the remote machine back to 
yours, if you open things up enough that you can ssh etc. into the 
local machine.  (I have my firewall block connections from outside the
local network, so I can do this locally but not remotely.)

p.s.  I hate screen.

-- 

TonyN.:'   mailto:tonynel...@georgeanelson.com
  '  http://www.georgeanelson.com/


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1269276363.393...@localhost.localdomain



Re: Re: Transferring files over SSH in the console

2010-03-22 Thread Dotan Cohen
 I can have as many open connections as I want, it's on the LAN. But I
 would _prefer_ just one terminal window for both commands (SSH) and
 file transfers.


 You might like to try this.

 1) Add to ~/.ssh/config
 ControlMaster auto
 ControlPath /tmp/%h%p%r
 (man ssh_config for explanation).

 2) Fire up sftp
 sftp u...@machine:/path

 3) Within sftp, login to a shell on the remote system
 !ssh u...@machine
 Exit the shell to return to the sftp prompt.

 4) Use sftp's history to recall the ssh command as desired.


That is an interesting idea! I did not realise that one could open a
shell via sftp like that.

 Note that by using the control socket, the shell login uses the same
 connection as sftp. Consequently you don't have to enter the password
 again.


Nice!

 Allow me to make a plug for the lftp package which I find more
 friendly and flexible than sftp (filename completion, get/put multiple
 files, and much more).
 At (2) enter
 lftp sftp://u...@machine/path
 then carry on as before.


Plug away! I will look into that.


 I hope this helps.


It most certainly does, Clive. Thanks!


-- 
Dotan Cohen

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003221229u13b595d5g5e8ece7a88a3b...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-22 Thread Dotan Cohen
On 22 March 2010 18:46, Tony Nelson tonynel...@georgeanelson.com wrote:
 On 10-03-21 18:52:36, Dotan Cohen wrote:
 I am managing a small embedded device that I SSH into over the LAN.
 To run commands, I use KDE Konsole, and to transfer files I use
 Konqueror and SFTP. I understand that SFTP also runs over SSH, so is
 there a way to send files in Konsole as well? I am familiar with the
 FTP commands such as cd, lcd, put, and get. Are there equivalent
 commands for SSH terminal connections?

 Though your request is reasonable, I believe one can not bothe have a
 terminal and transfer files using OpenSSH's ssh command.  There might
 be something possible with port forwarding, and perhaps an escape could
 be added to ssh to provide access to the sftp subsystem, but what I
 always do is just do the transfer separately, as you do, and keep track
 of the CWD myself.

 Transfers can be done from the same terminal by backgrounding the ssh
 connection and then using sftp or scp.  In ssh and bash (see ESCAPE
 CHARACTERS in `man ssh` and JOB CONTROL in `man bash`):

 [ ~]# ll mime.py
 -rw-r--r-- 1 root root 16782 May 18  2009 mime.py
 [ ~]# ~^Z [suspend ssh]

 [1]+  Stopped                 ssh r...@foo.com
 [to...@localhost ~]$ ll mime.py
 ls: cannot access mime.py: No such file or directory
 [to...@localhost ~]$ scp r...@foo.com:mime.py .
 mime.py
 100%   16KB  16.4KB/s   00:01
 [to...@localhost ~]$ fg
 ssh r...@foo.com

 [r...@rapidxen ~]#

 You can keep sftp running and switch back and forth by ^Z out of sftp
 and fg %- to go back to the other job, ssh.  Use the up arrow into
 command history to avoid even typing fg %-.

 Or, you could always use sftp or scp from the remote machine back to
 yours, if you open things up enough that you can ssh etc. into the
 local machine.  (I have my firewall block connections from outside the
 local network, so I can do this locally but not remotely.)


Thanks. Yes, on the LAN things are this open.


 p.s.  I hate screen.


Why? I actually like it.

-- 
Dotan Cohen

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


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003221233n6a992b4au1bb4dfcc6d2aa...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-22 Thread Tony Nelson
On 10-03-22 15:33:20, Dotan Cohen wrote:
 On 22 March 2010 18:46, Tony Nelson tonynel...@georgeanelson.com
 wrote:
 ...
  p.s.  I hate screen.
 
 
 Why? I actually like it.

Besides having to learn a new set of odd keybindings, I use the 
scrollback of a terminal a lot, and entering a mode to do it was not 
satisfactory at all.  Even a standard Linux VT worked more easily.  I 
wanted to like screen, as it's ability to hold a session open after 
losing a connection would be useful to me.

-- 

TonyN.:'   mailto:tonynel...@georgeanelson.com
  '  http://www.georgeanelson.com/


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1269287839.636...@localhost.localdomain



Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
I am managing a small embedded device that I SSH into over the LAN. To
run commands, I use KDE Konsole, and to transfer files I use Konqueror
and SFTP. I understand that SFTP also runs over SSH, so is there a way
to send files in Konsole as well? I am familiar with the FTP commands
such as cd, lcd, put, and get. Are there equivalent commands for SSH
terminal connections?

Thanks.

-- 
Dotan Cohen

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211552le9d6018odb9bd683c3c89...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Selçuk Mıynat
On Mon, Mar 22, 2010 at 00:52, Dotan Cohen dotanco...@gmail.com wrote:
 I am managing a small embedded device that I SSH into over the LAN. To
 run commands, I use KDE Konsole, and to transfer files I use Konqueror
 and SFTP. I understand that SFTP also runs over SSH, so is there a way
 to send files in Konsole as well? I am familiar with the FTP commands
 such as cd, lcd, put, and get. Are there equivalent commands for SSH
 terminal connections?

Are you looking for scp?

http://en.wikipedia.org/wiki/Secure_copy
http://www.helpdesk.umd.edu/documents/4/4801/

-- 
Selçuk


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/74a48c341003211557q34a26618padc3502f3278e...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Tom H
 I am managing a small embedded device that I SSH into over the LAN. To
 run commands, I use KDE Konsole, and to transfer files I use Konqueror
 and SFTP. I understand that SFTP also runs over SSH, so is there a way
 to send files in Konsole as well? I am familiar with the FTP commands
 such as cd, lcd, put, and get. Are there equivalent commands for SSH
 terminal connections?

The default
/etc/ssh/sshd_config
has a
subsystem sftp ...
towards the end of the file, so you should be able to run
sftp u...@host
and use the above ftp commands.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/6d4219cc1003211601r44e9c7d8kda1ac5d2f809b...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
On 22 March 2010 00:57, Selçuk Mıynat selcukmiy...@gmail.com wrote:
 On Mon, Mar 22, 2010 at 00:52, Dotan Cohen dotanco...@gmail.com wrote:
 I am managing a small embedded device that I SSH into over the LAN. To
 run commands, I use KDE Konsole, and to transfer files I use Konqueror
 and SFTP. I understand that SFTP also runs over SSH, so is there a way
 to send files in Konsole as well? I am familiar with the FTP commands
 such as cd, lcd, put, and get. Are there equivalent commands for SSH
 terminal connections?

 Are you looking for scp?

 http://en.wikipedia.org/wiki/Secure_copy
 http://www.helpdesk.umd.edu/documents/4/4801/


No, scp is for sending files to a remote machine that the user has yet
to connect to:
localhost$ scp /path/to/file.txt u...@remotemachine /remote/path/

However, I want something like this:
localhost$ ls
file.txt
localhost$ ssh u...@remotemachine
remoteMachine$ ls
remoteMachine$ put file.txt
remoteMachine$ ls
file.txt
remoteMachine$

Of course, that put command does not exist in SSH (it does exist in
FTP). What _does_ work like that in SSH?

-- 
Dotan Cohen

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

Please CC me if you want to be sure that I read your message. I do not
read all list mail.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211602i524783f4g7637283185b04...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 The default
 /etc/ssh/sshd_config
 has a
 subsystem sftp ...
 towards the end of the file, so you should be able to run
 sftp u...@host
 and use the above ftp commands.


Yes, but then I cannot get a regular shell for vim and such. I need to
both run commands and also transfer files.

-- 
Dotan Cohen

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

Please CC me if you want to be sure that I read your message. I do not
read all list mail.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211605u52f06f2cj8e8a43c599ca4...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Ron Johnson

On 2010-03-21 18:02, Dotan Cohen wrote:

On 22 March 2010 00:57, Selçuk Mıynat selcukmiy...@gmail.com wrote:

On Mon, Mar 22, 2010 at 00:52, Dotan Cohen dotanco...@gmail.com wrote:

I am managing a small embedded device that I SSH into over the LAN. To
run commands, I use KDE Konsole, and to transfer files I use Konqueror
and SFTP. I understand that SFTP also runs over SSH, so is there a way
to send files in Konsole as well? I am familiar with the FTP commands
such as cd, lcd, put, and get. Are there equivalent commands for SSH
terminal connections?

Are you looking for scp?

http://en.wikipedia.org/wiki/Secure_copy
http://www.helpdesk.umd.edu/documents/4/4801/



No, scp is for sending files to a remote machine that the user has yet
to connect to:


Eh?  I think you're imposing unneeded self limits.


localhost$ scp /path/to/file.txt u...@remotemachine /remote/path/

However, I want something like this:
localhost$ ls
file.txt
localhost$ ssh u...@remotemachine
remoteMachine$ ls
remoteMachine$ put file.txt
remoteMachine$ ls
file.txt
remoteMachine$

Of course, that put command does not exist in SSH (it does exist in
FTP). What _does_ work like that in SSH?



sftp.

--
History does not long entrust the care of freedom to the weak
or the timid.  Dwight Eisenhower


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4ba6a83c.5020...@cox.net



Re: Transferring files over SSH in the console

2010-03-21 Thread Ron Johnson

On 2010-03-21 18:05, Dotan Cohen wrote:

The default
/etc/ssh/sshd_config
has a
subsystem sftp ...
towards the end of the file, so you should be able to run
sftp u...@host
and use the above ftp commands.



Yes, but then I cannot get a regular shell for vim and such. I need to
both run commands and also transfer files.



That's what scp is for!

--
History does not long entrust the care of freedom to the weak
or the timid.  Dwight Eisenhower


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4ba6a861.5040...@cox.net



Re: Transferring files over SSH in the console

2010-03-21 Thread Eduardo M KALINOWSKI

Dotan Cohen wrote:

Yes, but then I cannot get a regular shell for vim and such. I need to
both run commands and also transfer files.
  
Well, you can't. But sshfs might help, you mount a remote filesystem 
(accessed via ssh) and use files as in any other filesystem.



--
Eduardo M KALINOWSKI
edua...@kalinowski.com.br


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4ba6a862.2090...@kalinowski.com.br



Re: Transferring files over SSH in the console

2010-03-21 Thread Ustun Kaya
well you can ssh to the remote machine first, then scp back to the
localhost from the remote machine, does the trick?

Best,
Ustun

On Sun, Mar 21, 2010 at 4:14 PM, Ron Johnson ron.l.john...@cox.net wrote:
 On 2010-03-21 18:05, Dotan Cohen wrote:

 The default
 /etc/ssh/sshd_config
 has a
 subsystem sftp ...
 towards the end of the file, so you should be able to run
 sftp u...@host
 and use the above ftp commands.


 Yes, but then I cannot get a regular shell for vim and such. I need to
 both run commands and also transfer files.


 That's what scp is for!

 --
 History does not long entrust the care of freedom to the weak
 or the timid.  Dwight Eisenhower


 --
 To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject
 of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/4ba6a861.5040...@cox.net




--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/369716d1003211615g12fe82bai566708aa2922c...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Tom H
 The default
 /etc/ssh/sshd_config
 has a
 subsystem sftp ...
 towards the end of the file, so you should be able to run
 sftp u...@host
 and use the above ftp commands.

 Yes, but then I cannot get a regular shell for vim and such. I need to
 both run commands and also transfer files.

LOL

I no longer have your original email but you seemed to be asking about
ftp-like features.

Why don't you have two sessions open, one for transferring through
sftp and one vi and whatever else through ssh?


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/6d4219cc1003211618o2ceaef49p96aad05a2051f...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 No, scp is for sending files to a remote machine that the user has yet
 to connect to:

 Eh?  I think you're imposing unneeded self limits.


How so? With scp I can send file to the machine that I'm remotely connected to?


 sftp.


✈dcl:~$ sftp u...@1.2.3.4
Connecting to 1.2.3.4...
u...@1.2.3.4's password:
sftp which ls
Invalid command.
sftp

So there, no shell. I need a shell.


-- 
Dotan Cohen

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

Please CC me if you want to be sure that I read your message. I do not
read all list mail.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211625w199e1c8ct2f56d353a2495...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 Yes, but then I cannot get a regular shell for vim and such. I need to
 both run commands and also transfer files.


 That's what scp is for!


How can I get a shell with scp?


-- 
Dotan Cohen

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

Please CC me if you want to be sure that I read your message. I do not
read all list mail.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211626j557d15c5rcbe11ee2f7126...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 Yes, but then I cannot get a regular shell for vim and such. I need to
 both run commands and also transfer files.


 Well, you can't. But sshfs might help, you mount a remote filesystem
 (accessed via ssh) and use files as in any other filesystem.



I had considered fuse, but there is no real advantage. I still need
two terminal windows open: one for transferring files (sftp) and the
second for running commands (ssh).

-- 
Dotan Cohen

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

Please CC me if you want to be sure that I read your message. I do not
read all list mail.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211627u4e1128bqf63c0b194ee3c...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 well you can ssh to the remote machine first, then scp back to the
 localhost from the remote machine, does the trick?


scp is for putting files, not for getting files.

-- 
Dotan Cohen

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211628w21bd055cm7e3719eab8f65...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Tom H
 sftp.

 ✈dcl:~$ sftp u...@1.2.3.4
 Connecting to 1.2.3.4...
 u...@1.2.3.4's password:
 sftp which ls
 Invalid command.
 sftp

 So there, no shell. I need a shell.

sftp is to ftp what ssh is to telnet. You did not have a telnet shell
in the past when connecting through ftp.

If you can only have one connection and need both shell and transfer
access, someone suggested sshfs earlier.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/6d4219cc1003211629o74b94222if0240f1955626...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 Why don't you have two sessions open, one for transferring through
 sftp and one vi and whatever else through ssh?


That is what I am doing. But I thought it would be nice to have it all
in one session.


-- 
Dotan Cohen

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

Please CC me if you want to be sure that I read your message. I do not
read all list mail.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211629p85b57bck41a27d79770d1...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 sftp is to ftp what ssh is to telnet. You did not have a telnet shell
 in the past when connecting through ftp.


I realize that.

 If you can only have one connection and need both shell and transfer
 access, someone suggested sshfs earlier.


I can have as many open connections as I want, it's on the LAN. But I
would _prefer_ just one terminal window for both commands (SSH) and
file transfers.

-- 
Dotan Cohen

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

Please CC me if you want to be sure that I read your message. I do not
read all list mail.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211632q28500a26td98c452d84399...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Ron Johnson

On 2010-03-21 18:25, Dotan Cohen wrote:

No, scp is for sending files to a remote machine that the user has yet
to connect to:

Eh?  I think you're imposing unneeded self limits.



How so? With scp I can send file to the machine that I'm remotely connected to?



Of course.  It's a *copy* program.

$ man scp

SCP(1)  BSD General Commands Manual

NAME
 scp — secure copy (remote file copy program)



sftp.



✈dcl:~$ sftp u...@1.2.3.4
Connecting to 1.2.3.4...
u...@1.2.3.4's password:
sftp which ls
Invalid command.
sftp

So there, no shell. I need a shell.



You wanted put, I give you put.


--
History does not long entrust the care of freedom to the weak
or the timid.  Dwight Eisenhower


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4ba6ad3b.2060...@cox.net



Re: Transferring files over SSH in the console

2010-03-21 Thread Ron Johnson

On 2010-03-21 18:28, Dotan Cohen wrote:

well you can ssh to the remote machine first, then scp back to the
localhost from the remote machine, does the trick?



scp is for putting files, not for getting files.



That's just *not* true.  It doesn't care whether the source or 
destination are remote or local.


--
History does not long entrust the care of freedom to the weak
or the timid.  Dwight Eisenhower


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4ba6add3.8020...@cox.net



Re: Transferring files over SSH in the console

2010-03-21 Thread Ron Johnson

On 2010-03-21 18:26, Dotan Cohen wrote:

Yes, but then I cannot get a regular shell for vim and such. I need to
both run commands and also transfer files.


That's what scp is for!



How can I get a shell with scp?



Sigh.  What exactly are you trying to *accomplish*

--
History does not long entrust the care of freedom to the weak
or the timid.  Dwight Eisenhower


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4ba6adfb.40...@cox.net



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 How so? With scp I can send file to the machine that I'm remotely
 connected to?

 Of course.  It's a *copy* program.


For copying to a remote machine. But once I have a shell on that
machine open in my terminal, I'm not able to send commands to my local
machine in that terminal.


 So there, no shell. I need a shell.


 You wanted put, I give you put.


No, I already have put with sftp. But I want put and which. Am I
really the first person in forty years of Unix history who needs to
both run commands and to transfer files to a remote machine?


 scp is for putting files, not for getting files.


 That's just *not* true.  It doesn't care whether the source or destination
 are remote or local.


You're right! Thanks. It's logical, but I never used it that way
(never had a need and never saw a a mention of it).

-- 
Dotan Cohen

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


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211642i33b7812cu3dbcbfd46adf3...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 Sigh.  What exactly are you trying to *accomplish*


Just an example:
I want to move a tarball to the machine, unpack it there then edit a
file it in. I then want to make that file executable, run it, and
transfer the output file back to my localhost.

-- 
Dotan Cohen

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


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211647g74b36dc2ha0c16aeb29daa...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
  gnu screen.  One terminal.  Multiple programs.


That has no advantage over multiple terminal windows. If I cd in one
of them, the other doesn't cd, for instance.

-- 
Dotan Cohen

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


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211648t68889079s5c824cfb793db...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Ustun Kaya
still scp:

us...@localls
file.tgz
us...@localssh us...@remote
us...@remotescp us...@local:file.tgz .
us...@remotels
file.tgz
us...@remotetar xzvf file.tgz
us...@remotedo whatever you want
us...@remote scp file.tgz us...@local:

Best,
Ustun

On Sun, Mar 21, 2010 at 4:47 PM, Dotan Cohen dotanco...@gmail.com wrote:
 Sigh.  What exactly are you trying to *accomplish*


 Just an example:
 I want to move a tarball to the machine, unpack it there then edit a
 file it in. I then want to make that file executable, run it, and
 transfer the output file back to my localhost.

 --
 Dotan Cohen

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


 --
 To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: 
 http://lists.debian.org/880dece01003211647g74b36dc2ha0c16aeb29daa...@mail.gmail.com




--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/369716d1003211658n5edf488i318b4b96c307d...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Kumar Appaiah
On Mon, Mar 22, 2010 at 01:25:33AM +0200, Dotan Cohen wrote:
  Eh?  I think you're imposing unneeded self limits.
 
 
 How so? With scp I can send file to the machine that I'm remotely connected 
 to?

Like this:

# On local-machine
ssh remote-machine
# type type type in remote-machine shell…
scp local-machine:/home/kumar/Files/myfile.txt .
# type type type… (still on remote-machine)

HTH.

Kumar
-- 
How do you pronounce SunOS?  Just like you hear it, with a big SOS
-- dedicated to Roland Kaltefleiter


signature.asc
Description: Digital signature


Re: Transferring files over SSH in the console

2010-03-21 Thread Ron Johnson

On 2010-03-21 18:47, Dotan Cohen wrote:

Sigh.  What exactly are you trying to *accomplish*



Just an example:
I want to move a tarball to the machine, unpack it there then edit a
file it in. I then want to make that file executable, run it, and
transfer the output file back to my localhost.



Always starting from machine_a, where machine_b is the original 
remote host.


METHOD A.
1. ssh u...@machine_b
2. scp -v u...@machine_a:/some/tar/ball .
3. untar ...
4. chmod u+x
5. ./whatever
6. scp -v output.txt u...@machine_a:/home/user/.
7. exit


METHOD B.
1. scp -v /some/tar/ball u...@machine_b:/home/user/.
2. ssh u...@machine_b
3. untar ...
4. chmod u+x
5. ./whatever
6. exit
7. scp -v u...@machine_b:/home/user/output.txt .

--
History does not long entrust the care of freedom to the weak
or the timid.  Dwight Eisenhower


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4ba6b3d6.6070...@cox.net



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
On 22 March 2010 01:58, Ustun Kaya usk...@gmail.com wrote:
 still scp:

 us...@localls
 file.tgz
 us...@localssh us...@remote
 us...@remotescp us...@local:file.tgz .

While this is more cumbersome than put I will contend that it works.
Frankly I am surprised that this is the lease cumbersome way, I was
expecting a much more elegant solution.


 us...@remotels
 file.tgz
 us...@remotetar xzvf file.tgz
 us...@remotedo whatever you want
 us...@remote scp file.tgz us...@local:

 Best,
 Ustun


Thanks to all who contributed. I did learn a bit from this thread.

-- 
Dotan Cohen

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211704i2fc8de96i8e33688524464...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 Always starting from machine_a, where machine_b is the original remote
 host.

 METHOD A.
 1. ssh u...@machine_b
 2. scp -v u...@machine_a:/some/tar/ball .
 3. untar ...
 4. chmod u+x
 5. ./whatever
 6. scp -v output.txt u...@machine_a:/home/user/.
 7. exit


 METHOD B.
 1. scp -v /some/tar/ball u...@machine_b:/home/user/.
 2. ssh u...@machine_b
 3. untar ...
 4. chmod u+x
 5. ./whatever
 6. exit
 7. scp -v u...@machine_b:/home/user/output.txt .


Yes, Method A is closest to what I was hoping to achieve, but Method B
was closest to what I was doing. Method A is cumbersome because it
lacks lcd and forces the user to remember (and type) the username,
password, IP address, and full path to the file. I was hoping for an
elegant solution that did not need all that (sftp does not).

And maybe having a lls (local ls) would have been nice too,
something I've always missed from sftp.

-- 
Dotan Cohen

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

Please CC me if you want to be sure that I read your message. I do not
read all list mail.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211708r569fa06dq6b37bc1abfc0...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 And maybe having a lls (local ls) would have been nice too,
 something I've always missed from sftp.


That could be worded better. I meant that lls does not exist in
sftp, but it is something that I've always wanted.

-- 
Dotan Cohen

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

Please CC me if you want to be sure that I read your message. I do not
read all list mail.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211710u1653dc9qf7698a2753afa...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Eduardo M KALINOWSKI

Dotan Cohen wrote:

Why don't you have two sessions open, one for transferring through
sftp and one vi and whatever else through ssh


That is what I am doing. But I thought it would be nice to have it all
in one session.
  


http://i-want-a-pony.com/IWantAPony.jpg

--
Eduardo M KALINOWSKI
edua...@kalinowski.com.br


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4ba6b70f.7090...@kalinowski.com.br



Re: Transferring files over SSH in the console

2010-03-21 Thread Ron Johnson

On 2010-03-21 19:10, Dotan Cohen wrote:

And maybe having a lls (local ls) would have been nice too,
something I've always missed from sftp.



That could be worded better. I meant that lls does not exist in
sftp, but it is something that I've always wanted.



man ssh and man scp really are your friends!

From machine_a:
$ ssh u...@machine_b ls -aFl /some/remote/dir

--
History does not long entrust the care of freedom to the weak
or the timid.  Dwight Eisenhower


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4ba6b7bb.3000...@cox.net



Re: Transferring files over SSH in the console

2010-03-21 Thread Steve Kemp
On Mon Mar 22, 2010 at 01:27:22 +0200, Dotan Cohen wrote:

 I had considered fuse, but there is no real advantage. I still need
 two terminal windows open: one for transferring files (sftp) and the
 second for running commands (ssh).

  gnu screen.  One terminal.  Multiple programs.

Steve
--
http://www.steve.org.uk/


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100321234054.ga14...@steve.org.uk



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 That is what I am doing. But I thought it would be nice to have it all
 in one session.

 http://i-want-a-pony.com/IWantAPony.jpg


I know!

But I've actually gotten quite a few ponies by asking, thus this
thread. Certainly I am not the first man to administer a remote
machine with the need to move files back and forth.


-- 
Dotan Cohen

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211732y4dd538b4xdfe57ac488b7f...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Stan Hoeppner
Dotan Cohen put forth on 3/21/2010 6:47 PM:
 Sigh.  What exactly are you trying to *accomplish*

 
 Just an example:
 I want to move a tarball to the machine, unpack it there then edit a
 file it in. I then want to make that file executable, run it, and
 transfer the output file back to my localhost.

http://www.mosix.org/

-- 
Stan


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4ba6bb03.7070...@hardwarefreak.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 That could be worded better. I meant that lls does not exist in
 sftp, but it is something that I've always wanted.

 man ssh and man scp really are your friends!

 From machine_a:
    $ ssh u...@machine_b ls -aFl /some/remote/dir


No, that's a workaround. I'll have RSI before I get all that out,
assuming I even remember the username, password, IP address, and full
path to the directory in question!

-- 
Dotan Cohen

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


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211734m36251586j63e16c6b6555d...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 http://www.mosix.org/


Thanks, Stan, but I think you missed a few messages in the thread! I
am looking for an interface to a remote machine that include features
from both sftp and ssh shell.


-- 
Dotan Cohen

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211737q11ae8a62ufdb72671e20eb...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Stan Hoeppner
Stan Hoeppner put forth on 3/21/2010 7:34 PM:
 Dotan Cohen put forth on 3/21/2010 6:47 PM:
 Sigh.  What exactly are you trying to *accomplish*


 Just an example:
 I want to move a tarball to the machine, unpack it there then edit a
 file it in. I then want to make that file executable, run it, and
 transfer the output file back to my localhost.
 
 http://www.mosix.org/

Scratch that.  I just reread your original post which says your remote host
is an embedded device.

-- 
Stan



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4ba6bc42.4070...@hardwarefreak.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Stan Hoeppner
Dotan Cohen put forth on 3/21/2010 7:37 PM:
 http://www.mosix.org/

 
 Thanks, Stan, but I think you missed a few messages in the thread! I
 am looking for an interface to a remote machine that include features
 from both sftp and ssh shell.

Mosix negates those interfaces.  All resources are local with Mosix.  I.e.
it makes one large SMP out of multiple machines.  Again, it wouldn't suit
you anyway as you're working with an embedded device.  You replied before my
correction email arrived.

-- 
Stan


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4ba6bcd8.3070...@hardwarefreak.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Ron Johnson

On 2010-03-21 19:34, Dotan Cohen wrote:

That could be worded better. I meant that lls does not exist in
sftp, but it is something that I've always wanted.

man ssh and man scp really are your friends!

From machine_a:
   $ ssh u...@machine_b ls -aFl /some/remote/dir



No, that's a workaround. I'll have RSI before I get all that out,
assuming I even remember the username, password, IP address, and full
path to the directory in question!



Aliases, scripts and passwordless login.

http://www.debian-administration.org/articles/152

--
History does not long entrust the care of freedom to the weak
or the timid.  Dwight Eisenhower


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4ba6bd6c.2080...@cox.net



Re: Transferring files over SSH in the console

2010-03-21 Thread Dotan Cohen
 Aliases, scripts and passwordless login.


I never use them an alias on a remote system because then I will never
remember which have aliases and which do not. I need to keep my
knowledge portable.

I have a bunch of these little critters that I need to configure:
http://en.wikipedia.org/wiki/Dreambox

They will then go out the door to users. I cannot configure aliases,
insatll scripts, and give passwordless login keys on them.


 http://www.debian-administration.org/articles/152


Great site, I visit it regularly.


-- 
Dotan Cohen

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/880dece01003211755sf64f14ct9a63a84ac36d3...@mail.gmail.com



Re: Transferring files over SSH in the console

2010-03-21 Thread Andrew Reid
On Sunday 21 March 2010 18:52:36 Dotan Cohen wrote:
 I am managing a small embedded device that I SSH into over the LAN. To
 run commands, I use KDE Konsole, and to transfer files I use Konqueror
 and SFTP. I understand that SFTP also runs over SSH, so is there a way
 to send files in Konsole as well? I am familiar with the FTP commands
 such as cd, lcd, put, and get. Are there equivalent commands for SSH
 terminal connections?

  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'

  i.e. pipe the file through a simple SSH invocation
of cat on the remote system.

-- A. 
-- 
Andrew Reid / rei...@bellatlantic.net


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201003212314.32985.rei...@bellatlantic.net



Re: Transferring files over SSH in the console

2010-03-21 Thread Andrew Reid
On Sunday 21 March 2010 23:14:32 Andrew Reid wrote:
 On Sunday 21 March 2010 18:52:36 Dotan Cohen wrote:
  I am managing a small embedded device that I SSH into over the LAN. To
  run commands, I use KDE Konsole, and to transfer files I use Konqueror
  and SFTP. I understand that SFTP also runs over SSH, so is there a way
  to send files in Konsole as well? I am familiar with the FTP commands
  such as cd, lcd, put, and get. Are there equivalent commands for SSH
  terminal connections?

   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.

-- A.
-- 
Andrew Reid / rei...@bellatlantic.net


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201003212325.49742.rei...@bellatlantic.net



Re: Transferring files over SSH in the console

2010-03-21 Thread Paul E Condon
On 20100322_010210, Dotan Cohen wrote:
 On 22 March 2010 00:57, Selçuk Mıynat selcukmiy...@gmail.com wrote:
  On Mon, Mar 22, 2010 at 00:52, Dotan Cohen dotanco...@gmail.com wrote:
  I am managing a small embedded device that I SSH into over the LAN. To
  run commands, I use KDE Konsole, and to transfer files I use Konqueror
  and SFTP. I understand that SFTP also runs over SSH, so is there a way
  to send files in Konsole as well? I am familiar with the FTP commands
  such as cd, lcd, put, and get. Are there equivalent commands for SSH
  terminal connections?
 
  Are you looking for scp?
 
  http://en.wikipedia.org/wiki/Secure_copy
  http://www.helpdesk.umd.edu/documents/4/4801/
 
 
 No, scp is for sending files to a remote machine that the user has yet
 to connect to:
 localhost$ scp /path/to/file.txt u...@remotemachine /remote/path/
 
 However, I want something like this:
 localhost$ ls
 file.txt
 localhost$ ssh u...@remotemachine
 remoteMachine$ ls
 remoteMachine$ put file.txt
 remoteMachine$ ls
 file.txt
 remoteMachine$
 
 Of course, that put command does not exist in SSH (it does exist in
 FTP). What _does_ work like that in SSH?

Dotan,

You are getting many responses, so perhaps this idea has already been
rejected, however --- I use ssh AND sshfs. I get shell access to the
remote machine with ssh and for file access I mount the portion of the
remote fs that a want on a local mount point. I know there are a lot
of machinations going on under the covers, but it does work. Put the
mount point in your home directory. If you can ssh to root on the remote,
you can also get root access to the remote file system. 

It works for me.

-- 
Paul E Condon   
pecon...@mesanetworks.net


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100322043118.ga29...@big.lan.gnu



Re: Transferring files over SSH in the console

2010-03-21 Thread Clive McBarton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dotan Cohen wrote:
 I can have as many open connections as I want, it's on the LAN. But I
 would _prefer_ just one terminal window for both commands (SSH) and
 file transfers.

First of all, I believe the ssh protocol (not necessarily the ssh
program) already support exactly what you want: logging in and, if you
want, sending files through the already opened tunnel.

PuTTY does exactly that. If you are logged in, you can press a button to
open a (local) file browser for the remote files. Without new password
entering. So I guess it uses the same tunnel.

So here's your first solution: use putty. It exists for Linux also.

Second solution: if the ssh protocol supports what you want but the ssh
program does not, then complain to whoever maintains ssh (program) to
include that option. For example, a hotkey to switch it into sftp mode
in the already open connection.

More solutions (sshfs, or just giving up and typing several commands)
have already been posted here.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkum91QACgkQ+VSRxYk440+4pQCgtPJZ02AUmIcZ7cEN/kUL1BHe
V64AnRtd2VkXPx4N3XDKLM2U2T5PogI4
=7xt3
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4ba6f755.4030...@web.de