I messed up configuring my config.fish, and I now cannot use my server.

Whenever I try to log in, it says

fish: Unknown command '/usr/bin/keychain /home/freebsd/.ssh/id_dsa'
/home/freebsd/.config/fish/config.fish (line 21): /usr/bin/keychain $HOME/.ssh/id_dsa

It then just lets me type until I ^Cand end the connection close the terminal tab: the ^C trick only happens sometimes. Trying to ssh root@server just gives me the response to log in as the freebsd user.

If I try to scp to edit the remote config.fish to get rid of the offending lines, it still gives me the same error, rather than let me access the file.

Logging in to Digital Ocean and accessing the console is of absolutely no use whatsoever, since I have no idea what the passwords may be, since I always use ssh to log in (so there may only be the ssh keys, which I don't think I can use at the DO console prompt).

This question seems to indicate that I need to tell my VPS to do a hard reboot from DO's website and then do stuff with single user mode. Is that the only way forward?

^D got me to a prompt, so I could undo the changes to config.fish.

  • That suggests a command was running that was reading from stdin. Also, the fact you couldn't use scp suggests you're running things from your ~/.config/fish that are not appropriate for a non-interactive session. You probably need to guard some of your config.fish entries with if status --interactive. – Kurtis Rader Aug 26 '16 at 15:39

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.