Created
February 20, 2019 16:25
-
-
Save jaytennier/218121077d2a580aece7ec2be83220c7 to your computer and use it in GitHub Desktop.
Testing SSH tailing in Crystal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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