option('force')) { $this->error('Keys already exist. Use --force to overwrite.'); return; } exec('openssl genpkey -algorithm RSA -out '.$privateKeyPath); exec('chmod 600 '.$privateKeyPath); exec('ssh-keygen -y -f '.$privateKeyPath.' > '.$publicKeyPath); exec('chown -R '.get_current_user().':'.get_current_user().' '.$privateKeyPath); exec('chown -R '.get_current_user().':'.get_current_user().' '.$publicKeyPath); $this->info('Keys generated successfully.'); } }