# Create and execute a shell script (SSH) on controller

**URL:** <https://www.wago.community/t/create-and-execute-a-shell-script-ssh-on-controller/2863>\
**Category:** Hardware and Linux\
**Created:** [September 3, 2026, 10:04am UTC](https://www.wago.community/t/create-and-execute-a-shell-script-ssh-on-controller/2863 "2026-09-03T10:04:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anton](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Anton](https://www.wago.community/u/Anton)\
**Post date:** [September 3, 2026, 10:04am UTC](https://www.wago.community/t/create-and-execute-a-shell-script-ssh-on-controller/2863/1 "2026-09-03T10:04:13Z")

</div>

I am having trouble to get a Linux shell script to execute on a 750-8212 controller through SSH. Can this be done? If so, where is a proper place on the controller file system for a shell script? The script only needs to run once.

Some additional background information:  
So far I have tried the SD card but setting the execute bit fails. This might be due to a limitation of the file system on the card (fat32). The home directory for the admin user seems not fitting. It symlinks to the codesys\_root directory. This does not seem like a proper location to me. Also, admin is not allowed to transfer files via ftp to that location anyway. The noexec setting in fstab can also be related.

---

<div class="post-metadata">

**Author:** ![Anton](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Anton](https://www.wago.community/u/Anton)\
**Post date:** [September 4, 2026, 10:42am UTC](https://www.wago.community/t/create-and-execute-a-shell-script-ssh-on-controller/2863/2 "2026-09-04T10:42:39Z")

</div>

For anyone running into a similar situation: it seems /usr/local/bin is a fitting location for custom shell scripts to execute via ssh on a controller.

The controller does not permit ftp write access into /usr/local/bin. The following steps did work:

1. use ftp to copy the script file(s) to the controller sd card
2. use ssh (as root) to move the script file(s) from sd card to /usr/local/bin
3. use ssh to set the execution bit (i.e. chmod a+x myfancyscript.sh)
4. use ssh to execute the script file(s), either as root or admin

Of course this will not work if there is no SD card in the controller. In my case a large number of files on the SD card had to be manipulated, which implies the presence of an SD card.
