Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 372399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:12:25+00:00 2026-05-12T14:12:25+00:00

I’m building a web control that will let our junior IT staff manage firmware

  • 0

I’m building a web control that will let our junior IT staff manage firmware on our LifeSize phones. Currently we do this by uploading the new firmware onto a central server, then running this command for each phone we want to upgrade

cat new_firmware.cramfs | ssh -T cli@1.1.1.1 "upgrade all"

This asks me for the password, then uploads the firmware. Works like a champ, but it takes someone comfortable with CLI tools, SSH access to this server, and patience to look up all the IPs of all the phones.

It looks like we’re stuck with a password logon, testing with certificates has been disastrous. The device being acted on is not a full-fledged computer, it’s a telephone running a tiny, proprietary embedded OS.

I’m working on a PHP script that can iterate over all the phones, but basically duplicate that function. This is what I have so far:

<?php
$firmware_filename = "new_firmware.cramfs";
$firmware_stream = fopen($firmware_filename,"rb");

$ssh_connection = ssh2_connect("1.1.1.1", 22);
ssh2_auth_password($ssh_connection, "cli", "password");
$ssh_stream = ssh2_exec($ssh_connection,'upgrade all');
$written = stream_copy_to_stream($firmware_stream,$ssh_stream,-1);

if($written != filesize($full_filename)){
 echo "The file is " . filesize($firmware_filename) . " bytes, I only wrote $written" . PHP_EOL;
}else{
 echo "All Good" . PHP_EOL;
}
?>

But this always returns

The file is 26988590 bytes, I only wrote 8192

And the upgrade does not proceed correctly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T14:12:26+00:00Added an answer on May 12, 2026 at 2:12 pm

    Well you could simply call

    system('cat new_firmware.cramfs | ssh -T cli@1.1.1.1 "upgrade all"');
    

    and then replace using your vars:

    system('cat ' . $firmware . ' | ssh -T ' . $username . '@' . $host . ' "upgrade all"');
    

    is this a solution for you?

    you can automate the ssh-access by placing the certificate-file into .ssh-directory. Read about SSH login without password.

    regards

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.