Few command under /usr/bin hangs when running from ssh terminal

Hi,

We have few MacStudio servers that when we ssh as users to it and trying to run some commands fro /usr/bin, they staying in hang state for infinite. When root user do the same commands are working properly

Example for hanging commands : clang, gcc, make, ld etc

Add as attachment the dtruss out for ld -v command to help debug it

Thanks, Amir

I'd confirm a few things about your environment:

Do the commands work when run directly via Terminal directly on these specific Macs? That is, when logged into the macOS user account as if it were on your desk, and not through ssh?

When using ssh, are you logging in to a user account that is already logged in through the system UI shell?

Do you have a developer toolchain selected? The output of xcode-select -p will point to an installation of Xcode, the Command Line Tools package, or nothing at all. When you run a command like /usr/bin/clang, that is a shim that bounces your command invocation over to the selected developer toolchain, and runs the tool version coming from that toolchain. That allows you to have multiple versions of Xcode or the Command Line Tools package installed, and switch between them.

— Ed Ford,  DTS Engineer

Few command under /usr/bin hangs when running from ssh terminal
 
 
Q