From: Dotan Cohen on 22 Mar 2010 05:00 >> 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-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/880dece01003220158m2153c00av3ba5c7075e5f12b2(a)mail.gmail.com
From: Clive Standbridge on 22 Mar 2010 06:50 > 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 user(a)machine:/path 3) Within sftp, login to a shell on the remote system !ssh user(a)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://user(a)machine/path then carry on as before. I hope this helps. -- Cheers, Clive -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/20100322094946.GA7145(a)rimmer.esmertec.com
From: Tony Nelson on 22 Mar 2010 12:50 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 root(a)foo.com [tonyn(a)localhost ~]$ ll mime.py ls: cannot access mime.py: No such file or directory [tonyn(a)localhost ~]$ scp root(a)foo.com:mime.py . mime.py 100% 16KB 16.4KB/s 00:01 [tonyn(a)localhost ~]$ fg ssh root(a)foo.com [root(a)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:tonynelson(a)georgeanelson.com> ' <http://www.georgeanelson.com/> -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/1269276363.3933.0(a)localhost.localdomain
From: Dotan Cohen on 22 Mar 2010 15:30 >> 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 user(a)machine:/path > > 3) Within sftp, login to a shell on the remote system > !ssh user(a)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://user(a)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-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/880dece01003221229u13b595d5g5e8ece7a88a3ba9d(a)mail.gmail.com
From: Dotan Cohen on 22 Mar 2010 15:40
On 22 March 2010 18:46, Tony Nelson <tonynelson(a)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 root(a)foo.com > [tonyn(a)localhost ~]$ ll mime.py > ls: cannot access mime.py: No such file or directory > [tonyn(a)localhost ~]$ scp root(a)foo.com:mime.py . > mime.py > 100%  16KB  16.4KB/s  00:01 > [tonyn(a)localhost ~]$ fg > ssh root(a)foo.com > > [root(a)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-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/880dece01003221233n6a992b4au1bb4dfcc6d2aaa32(a)mail.gmail.com |