

Ask HN: Why can't you "put" files through ssh? - noaharc

I hate having to have one terminal with ssh running and one terminal with sftp running (especially when sftp doesn't have tab completion or any of the other handly shell shortcuts).  Am I doing something wrong?
======
brk
Why not use scp?

Although, I'm not 100% sure what you're trying to accomplish.

~~~
noaharc
Well, from the man pages, it looks like this still requires another terminal
besides my ssh terminal (plus a lot of typing), so it's pretty much the same
setup as using sftp, right?

I just don't see why I can't type "put filename" in ssh like you can in sftp.
That really seems like a pleasurable user experience.

This really became a pain point for me last week, when I was testing a lot of
code on remote machines. I want to be able to manipulate them with ssh, but I
also want to be able to transfer my local copies easily.

~~~
lann
You can scp from a remote host to the host you're currently logged into
(assuming no firewall restrictions). You could even simulate the put command
with a sufficiently clever shell script by using the value of SSH_CLIENT or
_CONNECTION. To sweeten the deal, some shells (zsh at least) will even do tab-
completion for remote scp paths.

Aside from that, I don't think I could function without multiple terminals. I
usually have 6-7 open, minimum.

------
kngspook
In addition to all the scp comments here, if I'm doing a constant <edit files
locally, update remote copy of directory, test on remote> cycle; I'll usually
use rsync instead of scp.

------
tumult
You can do SCP. There are also various shell scripts that actually let you
pipe data over.

