FTP to MIB: Difference between revisions
Jump to navigation
Jump to search
| Line 46: | Line 46: | ||
cd /mnt/app/eso/hmi/scripts/ | cd /mnt/app/eso/hmi/scripts/ | ||
echo "" >> sftp-server.sh //todo | echo "#!/bin/s" >> sftp-server.sh //todo | ||
echo "LD_LIBRARY_PATH=/eso/hmi/engdefs/scripts/ssh/usr/lib:$LD_LIBRARY_PATH" >> sftp-server.sh | echo "LD_LIBRARY_PATH=/eso/hmi/engdefs/scripts/ssh/usr/lib:$LD_LIBRARY_PATH" >> sftp-server.sh | ||
echo "export LD_LIBRARY_PATH" >> sftp-server.sh | echo "export LD_LIBRARY_PATH" >> sftp-server.sh | ||
| Line 59: | Line 59: | ||
Subsystem sftp /net/mmx/mnt/app/eso/hmi/scripts/sftp-server.sh | Subsystem sftp /net/mmx/mnt/app/eso/hmi/scripts/sftp-server.sh | ||
Force storage sync | |||
sync | sync | ||
...and reboot the unit | |||
Revision as of 08:50, 16 September 2026
MHIG and MHI2
Here's how to install sshd and setup your environment to connect with MIB over ssh, sftp, and scp.
Prepare local machine
On your local machine start with editing the ~/.ssh/config file:
nano ~/.ssh/config
add those lines:
Host mhig-ap StrictHostKeyChecking no HostKeyAlgorithms +ssh-rsa HostName 192.168.1.1 User root Host mhi2-ap StrictHostKeyChecking no HostKeyAlgorithms +ssh-rsa HostName 10.173.189.1 User root Host mib-dlink StrictHostKeyChecking no HostKeyAlgorithms +ssh-rsa HostName 172.16.250.248 User root
Example above is using 192.168.1.1, 10.173.189.1, and 172.16.250.248 as the IP address. Those are default addresses that MIB1 and MIB2 units are using but might be different in your setup.
Prepare MIB
Install sshd via More Incredible Bash.
//todo
Find root password or change root password via More Incredible Bash.
//todo
Connect with MIB
sshpass -p "8scoUc70" ssh mhig-ap
Mount file system as writable
mount -uw /net/mmx/mnt/app && mount -uw /net/mmx/mnt/system
Create script for running the server
cd /mnt/app/eso/hmi/scripts/ echo "#!/bin/s" >> sftp-server.sh //todo echo "LD_LIBRARY_PATH=/eso/hmi/engdefs/scripts/ssh/usr/lib:$LD_LIBRARY_PATH" >> sftp-server.sh echo "export LD_LIBRARY_PATH" >> sftp-server.sh echo "exec /eso/hmi/engdefs/scripts/ssh/usr/libexec/sftp-server" >> sftp-server.sh chmod +x sftp-server.sh
Edit /mnt/app/eso/hmi/engdefs/scripts/ssh/etc/sshd_config file
Find line
Subsystem sftp /net/mmx/mnt/app/eso/hmi/engdefs/scripts/ssh/usr/libexec/sftp-server
and replace it with
Subsystem sftp /net/mmx/mnt/app/eso/hmi/scripts/sftp-server.sh
Force storage sync
sync
...and reboot the unit