Plink Error Command Not Found On Remote Host
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this plink bash command not found site About Us Learn more about Stack Overflow the company Business Learn more
Plink Multiple Commands
about hiring developers or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ Unix plink download & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute: Sign up Here's how it works: putty Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Where does plink (from Putty package) search for remote commands? up vote 2 down vote favorite 1 I need to use plink (or something similar if you have something on mind) to get the output from Debian remote machine onto my Windows box. This works e.g. in this case : plink 192.168.1.5 "ls" > log.txt But when I want to use different command like e.g. ifconfig or what is my point of interest my alias for the script I get the error command not found : Server sent command exit status 127 bash: showip: command not found Disconnected: All channels closed Where does the plink look for commands in this case ? I can easily execute aforementioned commands. bash shell remote putty share|improve this question asked Apr 15 '12 at 22:20 Patryk 1,90072540 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote accepted plink is running non-interactively and therefore doesn't get your normal shell setup; in particular $PATH is going to be the default (typically /bin:/usr/bin:/usr/local/bin or some permutation thereof). In particular it will have neither your personal bin directory (wherever you put it) or /usr/sbin where many tools like ifconfig live. share|improve this answer answered Apr 15 '12 at 22:22 geekosaur 16.8k24247 You can always use getconf to show the details. For example, ssh localhost '/usr/bin/getconf PATH' returns /bin:/usr/bin on my system. –CodeGnome May 28 '12 at 6:28 add a comment| Your Answer draft saved draft
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Connecting to app server using plink up vote 0 down vote favorite I need to connect to psadmin http://unix.stackexchange.com/questions/36502/where-does-plink-from-putty-package-search-for-remote-commands using plink. Try: plink -ssh [hostname] -l [user] -pw [password] psadmin When I run this I get error code 127 Command not found: psadmin When I enter into the shell using plink and run psadmin. This works fine. Is this a issue with permissions? Or Am I doing anything wrong? ssh putty cmd.exe plink share|improve this question asked Apr 22 '15 at 6:02 Kiran Kumar 1 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote http://superuser.com/questions/904518/connecting-to-app-server-using-plink The remote shell might depend on configuration like /etc/profile to find the psadmin program; on Linux, some distributions don't enable the needed options when compiling bash. So tell it to read the configuration manually: plink [user]@[hostname] ". /etc/profile && psadmin" (Also, -pw? Really, make a key for use with -i instead.) share|improve this answer answered Apr 22 '15 at 6:09 grawity 158k19296381 grawity, I tried it and got the following error plink -ssh [hostname] -l [username] -pw [password] ". /etc/profile && psadmin" ksh: line 1: psadmin: not found Plink error: Command not found on remote host (Exit code 127) –Kiran Kumar Apr 22 '15 at 7:01 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged ssh putty cmd.exe plink or ask your own question. asked 1 year ago viewed 191 times active 1 year ago Related 1plink takes connection host from putty's default connection0PLINK is stuck at an older host - how do I replace it?2Plink, backspace and bell1Tunneling ssh traffic to Linux server via multiple windows servers (2k8)0feed data to remote SSH linux script through putty/plink that were
Database CPUs Solaris Novell OpenVMS DOS Unix Mac Lounge Login» http://www.computing.net/answers/programming/running-commands-on-remote-box-using-plink/21565.html Register» Connect» Hardware & Devices ▼ General Hardware CPUs/Overclocking Networking See More... Software ▼ Security and Virus Office Software PC Gaming See More... Operating Systems ▼ Windows 10 Windows 8 Windows 7 Windows XP See More... Off-Topic Tags How-tos Drivers Ask a Question Computing.NetForumsProgrammingBatch/Scripting Solved Running commands on remote box using Plink Tags:Server Technext May command not 24, 2010 at 09:57:50 Specs: Windows XP Hi,I am using Plink to access remote server. I want to run few commands on the remote server. Though I am able to connect to the remote machine, I am not able to run any command.The following works:---------------------------------------------------plink -ssh -l %user_name% -pw %user_pwd% %machine%---------------------------------------------------The following doesn't:-------------------------------------------------------------------plink -ssh -l command not found %user_name% -pw %user_pwd% %machine% "cd e:\data"-------------------------------------------------------------------Can anyone please tell me how to do 'cd' on a remote box using plink? Obviously, I want to run few other commands as well after doing 'cd' operation.Regards,GC See More: Running commands on remote box using Plink Report • ✔ Best Answer Razor2.3 June 30, 2010 at 10:39:24 Are you using OpenSSH for Windows? That uses an out-of-date minimal install of Cygwin. And it doesn't have mv.exe. It does have mkdir.exe, and rmdir.exe, so that's why those commands work.I suggest either using the full version of Cygwin, or use CMD to do the moves for you:c:\windows\system32\cmd /c move "fileA" "fileB" See in Thread ↓#1 Technext June 29, 2010 at 22:56:23 Hi,I have finally been able to run command on remote machine using Plink. The problem was with the syntax. It now works both by passing the command as argument, and by using the ‘–m file’ option provided with Plink. For example,plink -ssh -pw xxx gaurav.chhabra@server cd c://sample//gc/