Link to home
Start Free TrialLog in
Avatar of python lnt
python lnt

asked on

connected to Linux Device over Putty using serial communication and would like read a file in Linux using VB Script

connected to Linux Device over Putty using serial communication and would like read a file in Linux using VB Script
Avatar of David Favor
David Favor
Flag of United States of America image

Putty is an ssh client, so once connected you have an ssh connection, which includes no implicit file access layer.

What you're looking for is either to scp (copy the file from the Linux device) the file locally + then read the file or... more likely...

Use sshfs.

With Windows... sigh... You'll have to search for some sshfs code to run on your Windows machine.

Likely this code will be glitchy... as Windows tends to produce glitchy results running Linux code.

So you may have to write error recovery logic, so if your code throws a file read exception, you tear down the sshfs connection + rebuild it (maybe several times) before you give up + your code dies.

Tear Down - means you dismount the remote file system + remount it, using command line sequences inside your code.

If I had a client requiring this, I'd use maybe a 5x tear down + rebuild of connection, before I'd exit the code with an error.
Which OS are you using? Good old hyperterm is able to connect to serial devices, it  has file transfer support.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.