Notes
  • Index
  • Assorted articles, tools and links
    • Raspberry Pi
  • Terminal Extravaganza
    • kitty
    • zsh
    • vim
    • git
    • ssh
  • Web Dev
    • Ruby on Rails
      • JSON:API
      • Database
      • Active Storage
      • Testing
    • Postgres
    • Mongo
  • System Administration
    • New server setup
    • systemd
    • launchd
  • DevOps
    • Ansible
    • Packer
    • Docker
    • Terraform
Powered by GitBook
On this page
  • Use Mosh for uninterrupted SSH access
  • Force password authentication

Was this helpful?

  1. Terminal Extravaganza

ssh

Use Mosh for uninterrupted SSH access

mosh is a layer on top of SSH that adds fault tolerance and improves performance, which is especially useful on mobile networks and when using ssh from your phone or tablet.

Installing it is relatively easy:

# add the PPA
sudo add-apt-repository ppa:keithw/mosh
# update the package index
sudo apt update
# install mosh
sudo apt install mosh -y
# let it through the firewall
sudo ufw allow mosh
sudo ufw reload

You should then be able to connect via mosh from the device of your choice.

Force password authentication

There might be an occasional situation in which you might want to authenticate using a password instead of connecting using your public key. Note that this will fail if the server has password authentication disabled.

# password only
ssh -o PreferredAuthentications=password user@127.0.0.1
# fallback to pubkey if server has password auth disabled
ssh -o PreferredAuthentications=password,publickey user@127.0.0.1
PreviousgitNextRuby on Rails

Last updated 5 years ago

Was this helpful?