@Override
	@Command
	public MessageResponse getProxyPublicKey() throws IOException {
		if(initRMI()) {
			ProxyPublicKeyResponse response = proxyRMI.getProxyPublicKey();
			if(!response.hasKey()) return new MessageResponse(response.toString());
			else {
				String pathToPublicKey = keysDir+"/proxy.pub.pem";
				PEMWriter out = new PEMWriter(new FileWriter(pathToPublicKey)); 
				out.writeObject(response.getKey());
				out.close();
				return new MessageResponse("Successfully received public key of Proxy.");
			}
		}
		else return new MessageResponse("Cannot connect to Proxy via RMI");
	}