1826397 Members
3705 Online
109692 Solutions
New Discussion

ssh

 
SOLVED
Go to solution
Thiyagarajan.s
Frequent Advisor

ssh

Hi greats
i want ssh username@ip 'command'
but the destination machine is running some profile at login
it was asking for some thing and my command is not getting exe

plz help

Thanks
9 REPLIES 9
Geoff Wild
Honored Contributor
Solution

Re: ssh

Without knowing more details - I'd say you need to fix whatever the remote machine is asking....

Maybe you can post the command and what is returned from the remote servers...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
baiju_3
Esteemed Contributor

Re: ssh

Hi Thyagarajan ,

Chek your "command" on the destination machine and modify it accordingky so that it won't require any input to be provided and then try ssh user@ip -n "Command" from the remote host .

Please post more details on the command you are executing .

thx,
bl.

Good things Just Got better (Plz,not stolen from advertisement -:) )
Thiyagarajan.s
Frequent Advisor

Re: ssh

Hi all
Thanks for your input!
The remote machine is a special machine where it asks for terminal type when u log in .

is there any way so that when i do ssh it will not execute the profile in etc

Arunvijai_4
Honored Contributor

Re: ssh

You need to have root access to the machine which you are logging in, then you can modify $/user/.profile to not to execute.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
RAC_1
Honored Contributor

Re: ssh

ssh -vvv some_user@some_machine
will give more details.
There is no substitute to HARDWORK
Muthukumar_5
Honored Contributor

Re: ssh

Some machine will prompt for getting terminal information to assing into TERM environment variable when they don't know it.

Give it as, vt100 and see whether it is executing or not.

what is there in /etc/profile on remote machine for TERM setting?

-Muthu
Easy to suggest when don't know about the problem!
Geoff Wild
Honored Contributor

Re: ssh

Try setting

TERM=vt100; export TERM

Then ssh...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Thiyagarajan.s
Frequent Advisor

Re: ssh

hi all
Thanks once again
I have tried following
a)give the terminal type
b)set the terminal type and exe command

I am getting
ioctl with TCGETS failed

Thanks


Arunvijai_4
Honored Contributor

Re: ssh

What version of SSH you are running ?

#swlist |grep -i "secure"

will you the version, update to the latest available version from

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"