Giter VIP home page Giter VIP logo

Comments (4)

holzschu avatar holzschu commented on July 16, 2024

That's a tough one. If I read the source code correctly, that command is executed on the host, so the most likely answer is that the host does not allow redirection to "/dev/null".

from a-shell.

tthkbw avatar tthkbw commented on July 16, 2024

The host is a MacBook Air M2 running Sonoma 14.3.1. When I execute

echo “hello, dev null” > /dev/null”

On the host, I see no issues.

I am running a-shell on an iPad Pro 12.9 3rd generation running iPadOS 17.4.

I’m pretty sure at one time I had ssh running without requiring a password from a-shell. But for awhile now I haven’t been able to. I hoped that the new ssh-copy-id command would solve my issues.

from a-shell.

holzschu avatar holzschu commented on July 16, 2024

I tried on my own MacBook Air, and it works. The thing is, ssh-copy-id needs to be able to connect to the other machine (using another ssh key, usually) in order to copy the new ID. If you cannot already connect with ssh, ssh-copy-id will not work.

from a-shell.

tthkbw avatar tthkbw commented on July 16, 2024

I am able to log in to my MacBook Air from my ipad using a-shell--it just asks for the password. Same for using sftp and other commands.

I think that you are trying this running a-shell on your MacBook??

So I tried that and got the same error. Then I thought, why not try another machine? So I tried using ssh-copy-id while using a-shell on my Air but connecting to my macmini. When I ssh-ed into the macmini first to be sure it worked, I realized that the macmini was using zsh as my shell because it asked to update. I went through the procedure and voila! ssh-copy-id worked perfectly and I could ssh without a password.

My default shell on the Air is fish. Then I realized that this issue probably started after I began using fish as my shell, which was probably shortly after getting the new MacBook Air M2. So, I thought, let's try changing the shell to see it that fixes the problem connecting to the Air.

It did! By changing the default shell to zsh, a-shell's ssh-copy-id does not fail and everything works as expected. Then I changed the default shell back to fish and it still works--which makes sense.

I suspect the failure has something to do with the fact that fish is installed using Homebrew and its path is /opt/homebrew/bin/fish rather that /bin/fish. Why this affects redirects to /dev/null, when fish does support this, I have no idea, but macos does comment that fish shell is a non-standard shell--probably because it does not come with macOS.

Anyway, others may have this issue as well, and I hope they find this solution!

from a-shell.

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.