Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

SSH

AndreiAndrei Member

Hey,

Just asking if anybody knows how to automatically print a section of text in SSH onto a website?

Many thanks,

Andrei

Comments

  • servarica_haniservarica_hani Member, Patron Provider

    do ps to get the process id of ssh or any process you want to capture
    then go to
    /proc/PID/fd/

    there you will find many files named 0 ,1 etc

    one or some of them contains the output of your ssh command

    So just output that file in your website

    another option is to use tee
    by piping the command output to tee and let tee write it to a file while showing it on console

    then simply output that file in your site

    Thanks

    Thanked by 2Andrei deadbeef
  • You may also just redirect the output from stdout to a file (just place " > output.txt" behind the command) and then get the contents of that text file (in php with file_get_contents, f.e.).

    Thanked by 1Andrei
  • Put a little script together for him. If someone else is interested, it's here: http://content.bitforce.io/let.txt

    Thanked by 1deadbeef
Sign In or Register to comment.