Env cmd

Hello,

As a workaround for certain issue, I want to use SSH with a clean environment.
I tried this: env -i ssh, but it returns:
env -i ssh
grep: ssh: No such file or directory

As I'm a beginner, it would be great if you can suggest me, what is going wrong here.

Thank you,

I don't understand your error message. It seems you've omitted something important. Where does grep come in?

Perhaps you should begin the story by describing the "certain issue" along with a more detailed description of your workaround.

Regards,
Alister

You certainly have aliased the env command,
check with

which env
type env

To temporarily escape aliasing, do

\env -i ssh

Or in case you have another env executable in you PATH:

/usr/bin/env -i ssh
1 Like

Hello,

Thank you for your reply.

which env
/usr/bin/env

type env
env is aliased to `env | grep -v `echo -e "\\e\["`'

It works with /usr/bin/env -i ssh.

Thank you,