[lug] Using "ask-pass" With sftp?
Kevin Fenzi
kevin at scrye.com
Wed Jun 22 10:14:33 MDT 2016
On Sat, 18 Jun 2016 18:36:51 +0000 (UTC)
stimits at comcast.net wrote:
> Hi,
>
> I have a bit of a conundrum, how do I use sftp from any (Ubuntu or
> other) machine to an embedded Ubuntu machine to download
> root-access-only files using only password, and not customizing each
> Ubuntu machine for allowing this? Can this be done on the command
> line? If I were using ssh, I could use force pseudo-terminal
> allocation and embed the sudo command into a single command over ssh,
> such as with scp. If I were using a local Fedora host, I could
> possibly ssh to the Ubuntu machine, sudo, and sftp in reverse from
> remote Ubuntu to local Fedora...but there is the possibility that
> both machines are Ubuntu. Is the only way to use sftp with an Ubuntu
> environment needing root access at both ends to customize the remote
> Ubuntu system itself? Side note: I'm thinking of renaming some Ubuntu
> machines to something like "RubiksCubuntu". :P
As a side note to the other solutions here you could easily make a
pretty simple ansible script to do this for you.
Something like:
- name: copy files from embeded device
hosts: embeded-device.example.com
user: unprivuseronembeded
become: yes
become_user: root
tasks:
- fetch: src=/tmp/somefile dest=/tmp/fetched
It's not sftp, but it's another somewhat easy to use option.
kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20160622/98a0a988/attachment.pgp>
More information about the LUG
mailing list