FTP to MIB
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
ssh mhig-ap
You will be prompted for password. While typing it, you will not see the input. That's normal.
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 sync sync exit
...and reboot the unit