Jump to content

madman77

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by madman77

  1. Ok, found a script that works... #!/bin/bash if `service ssh status | grep -q running` then service ssh stop echo "ssh stopped by user" else service ssh start echo "ssh started by user" fi
  2. Hey Dudes, I was thinking, they duck would be a good way to physicly enable or disable the SSH service on my headless ubuntu server when i need access to it. im not much of a scriptor but i was wondering if someone could write a short bash script for me that does the following: 1. Check to see if the ssh service is enabled or disabled 2. If enabled, then disable, if disabled then enable. (Im running ubuntu 14.04 LTS) if i now script my ducky to automaticly log myself in as root and call the bash script, I should be able to access the machine remotley simply by plugging in the duck (inserting once will enable ssh, reinserting again should disable ssh) Seems to me like a pretty full proof idea, can anyone help, or see any holes in this idea? Cheers guys :)
×
×
  • Create New...