• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Koushik Paul
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
http://www.coderanch.com/t/447016/java/java/Connect-Unix-server-JAVA
 
Rob Spoor
Sheriff
Posts: 20817
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!