This question is a bit far fetched (i don't even know if the way i'm going about doing this is correct). 
I have a script that gathers some information on a computer. The intent is to have that script ftp/sftp/any-transfer etc some data to a remote server. This script is intended to be distributed among many people also. 
Is it possible to hide the password/user of remote server in the script (or perhaps even the implementation details?). I was thinking of encoding it in some way. Any suggestions?
Also, in compiled languages like java or C, is it safe to just distribute around a compiled version of the code?
Thanks.
The answer is no.  You can't put the authentication details into the program and make it impossible for users to get those same authentication details.  You can try to obfuscate them, but it is not possible to ensure that they cannot be read.
Compiling the code will not even obfuscate them very much.
One approach to the problem would be to implement a REST web interface and supply each distribution of the program with an API key of some sort.  Then set up the program to connect to the interface over SSL using its key and put whatever information it needs there.  Then you could track which version is connecting from where and limit each distribution of the program to updating a restricted set of resources on the server.  Furthermore you could use server heuristics to guess if an api key has leaked and block an account if that occurs.
Another way would be if all of the hosts/users of the program are trusted, then you could set up user accounts on a server node and each script could authenticate with its own username and password or SSH key.  Your server node would then have to restrict access based on what each user is allowed to update.  Using SSH key based authentication allows you to avoid leaving the passwords around while still allowing authenticated access to your server.
Disguising username & password on distributed python scripts