The scp way: You could type the path to id_rsa.pub, or cd into the users home directory: scp id_rsa.pub user@ipaddress:.ssh/authorized_keys