Tag Archives: elevate

veducate header

How to run the last command as Sudo in Linux

A quick post as I always forget this command, learn how to run the last command again as sudo, to elevate and bypass permissions denied error.

## First command fails with permissions issue

dean@veducate # mv openshift-install /usr/local/bin/openshift-install
mv: cannot move 'openshift-install' to '/usr/local/bin/openshift-install': Permission denied

## Using the command "sudo !!" will run the last command with sudo, the full command will be outputed

dean@veducate # sudo !!
sudo mv openshift-install /usr/local/bin/openshift-install

## The terminal will return, including any necessary information as part of the command execution.

dean@veducate #

 

Regards

Dean Lewis

winscp logo

How to Elevate to Root Access with WinSCP

I was using WinSCP to transfer logs from a VMware CloudBuilder appliance to troubleshoot a failed lab deployment, however the files wouldn’t transfer as the user account to be used had to have root access. For this appliance, you need to elevate to root after login.

Good news, WinSCP can elevate to root after login, In your connection settings pane;

  1. Click Advanced
  2. Under “Environment” select “SCP/Shell”
  3. For the shell value, enter your command to elevate
  4. Save the configuration

When you next connect to your appliances, the command will be sent after login.

Winscp elevate to root

The official pages are here.

Regards

Dean