• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How I connect to remote Unix Box from standalone java application via ftp and use simple commands

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not authorized to use ssh/sftp( using private/public key). So ftp is my only choice.

The following piece of code works just fine for me, fetching the file from unix box, but my motto is to log in to a UNIX box from windows, using java app,then from my home directory go to a different directory and use grep, then copy that output back to my windows java program. I was looking for how to execute some unix command in the box. as we do it in shell/python/ant...



I need something like this but not ssh via ftp
https://coderanch.com/t/447016/java/java/Connect-Unix-server-JAVA
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
FTP stands for File Transfer Protocol, and that's exactly what it can do - transfer files (and other file operations such as list, delete, rename). You can't execute random commands using FTP. You really need SSH or its non-secure cousin Telnet for that. The changes that Telnet is enabled are slim though.
 
reply
    Bookmark Topic Watch Topic
  • New Topic