Skip to content

Instantly share code, notes, and snippets.

@jaytennier
Created February 20, 2019 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaytennier/218121077d2a580aece7ec2be83220c7 to your computer and use it in GitHub Desktop.
Save jaytennier/218121077d2a580aece7ec2be83220c7 to your computer and use it in GitHub Desktop.
Testing SSH tailing in Crystal
require "ssh2"
SSH2::Session.open("192.168.1.11") do |session|
session.login("crystaltest", "dumbp455w0rd")
session.open_session do |channel|
channel.command("tail -f log.txt")
while (line = channel.read_line)
puts line
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment