Per the title, I'm getting the following warning when I try to scp
through an ssh
tunnel. In my case, I cannot scp
directly to foo because port 1234 on device foo is being forwarded to another machine bar on a private network (and bar is the machine that is giving me a tunnel to 192.168.1.23).
$ # -f and -N don't matter and are only to run this example in one terminal
$ ssh -f -N -p 1234 userA@foo -L3333:192.168.1.23:22
$ scp -P 3333 foo.py ubuntu@localhost:
ubuntu@localhost's password:
stty: standard input: Inappropriate ioctl for device
foo.py 100% 1829 1.8KB/s 00:00
Does anyone know why I might be getting this warning about Inappropriate ioctl for device
?
I got the exact same problem when I included the following line on my
~/bashrc
:The purpose of this line was to allow the use of Ctrl-s in reverse search of bash.
This link has a solution (not available)
Web Archive version of the above link
There are several ways to check for interecative shell. The following solves the problem for bash: