@Override
	@Command
	public MessageResponse setUserPublicKey(String userName) throws IOException {
		if(initRMI()) {
			String pathToPublicKey = keysDir+"/"+userName+".pub.pem";
			PEMReader in;
			try {
				in = new PEMReader(new FileReader(pathToPublicKey));
				PublicKey publicKey = (PublicKey) in.readObject();
				in.close();
				return proxyRMI.setUserPublicKey(userName, publicKey);
			} catch (FileNotFoundException e) {
				return new MessageResponse("Key for user "+userName+" not found");
			}
		}
		else return new MessageResponse("Cannot connect to Proxy via RMI");
	}