Giter Site home page Giter Site logo

Comments (1)

killerbees19 avatar killerbees19 commented on June 3, 2024

Maybe that was an issue in year 2017, but currently it's not the case? (Tested at Ubuntu 20.04)

$ echo -e '\n~.' | ssh example.net -- 'dd of=/tmp/test.txt'
0+1 records in
0+1 records out
4 bytes (4 B) copied, 0.000616387 s, 6.5 kB/s

Quote from man page:

If an interactive session is requested ssh by default will only request a pseudo-terminal (pty) for interactive sessions when the client has one. The flags -T and -t can be used to override this behaviour.

If a pseudo-terminal has been allocated the user may use the escape characters noted below.

If no pseudo-terminal has been allocated, the session is transparent and can be used to reliably transfer binary data. On most systems, setting the escape character to β€œnone” will also make the session transparent even if a tty is used.

If you call ssh with command argument, it's not an interactive session. Therefore no pseudo-terminal will be allocated.

If you pipe something into ssh without command argument, it'll display a warning and skip pseudo-terminal allocation:

$ echo | ssh example.net
Pseudo-terminal will not be allocated because stdin is not a terminal.

[…]

So this should be safe at the moment: tar c . | ssh example.net -- 'tar x'

Anyways, it's still a nice idea to add it to the list. 😁 πŸ‘

from big-list-of-naughty-strings.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.