Thanks to visit codestin.com
Credit goes to github.com

Skip to content

remote execute not work? #48

@abbottjlu

Description

@abbottjlu

Create a script, hello.sh,

#!/bin/bash
echo OK-OK

Compile the script,

/ssc/ssc -u -s -r -S 10 -c -0 hello.sh hello.sh.x

Got the file hello.sh.x. Put this file on the server,

[root@login ~]# ls /tmp/hello.sh.x
/tmp/hello.sh.x
[root@login ~]# file /tmp/hello.sh.x
/tmp/hello.sh.x: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=9e4a645a8e2c87abdf77098a2ee69bdcf4e94648, stripped
[root@login ~]# ldd /tmp/hello.sh.x
	not a dynamic executable
[root@login ~]# /tmp/hello.sh.x
OK-OK
[root@login ~]#

[root@login ~]# scp /tmp/hello.sh.x node1:/tmp
hello.sh.x                                                                                                100% 1154KB 170.5MB/s   00:00
[root@login ~]# ssh node1 '/tmp/hello.sh.x'
# Stuck for a few seconds... no output


[root@login ~]# ssh node1 'date; hostname'
Mon Aug 25 10:16:46 AM CST 2025
node1
[root@login ~]# pdsh -w node1 'date; hostname'
node1: Mon Aug 25 10:19:25 AM CST 2025
node1: node1
[root@login ~]# pdsh -w node1 '/tmp/hello.sh.x'
# Stuck for a few seconds... no output

[root@login ~]# pdsh -w node1 '/tmp/hello.sh.x'
[root@login ~]# cat /etc/redhat-release
Rocky Linux release 10.0 (Red Quartz)
[root@login ~]# pdsh -w node1 'cat /etc/redhat-release'
node1: Rocky Linux release 10.0 (Red Quartz)
[root@login ~]#

A feature or a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions