Getting SSH client for powershell /limited functionality/

One option for getting SSH for Windows/ Powershell is the great plugin available at http://www.powershellmagazine.com/2014/07/03/posh-ssh-open-source-ssh-powershell-module/.

 

Easily installable by pasting iex (New-Object Net.WebClient).DownloadString(“https://gist.github.com/darkoperator/6152630/raw/c67de4f7cd780ba367cccbc2593f38d18ce6df89/instposhsshdev”) in elevated PS window.

Examples:

  1. To connect to SSH: New-SSHSession -ComputerName x.x.x.x
  2. To get the ID /index/ of the session: Get-SSHSession | fl
  3. To execute unamea on the connected machine: Invoke-SSHCommand -Index 0 -Comand “uname -a”

 

Note:

  1. Not useful if you want to launch applications /no VIM or Nano/,

Using VNC in Google Cloud

  1. Setup the firewall rules
    1. ingress rule for the inbound machine, port: tcp:5901-5910
    2. egress rule for the outbound machine, port: tcp:5901-5910
  2. Create the Linux instance:
    1. Choose the desirable config
    2. sudo apt-get update
    3. sudo apt-get install gnome-core
    4. sudo apt-get install vnc4server
    5. apply the network tag for the ingress rule
  3. Modify the vnc configuration on the Linux instance.
    1. vim .vnc/xstartup // as shown in the bottom of the post, credits to http://onkea.com/ubuntu-vnc-grey-screen/ for the config file
    2. :wq!
    3. sudo shutdown -r now
  4. On the other machine:
    1. apply the egress networking tag
    2. install vnc viewer of your choice
    3. connect to x.x.x.x:5901

Should work like a charm :).

Continue reading “Using VNC in Google Cloud”

Finding files in Linux

File searching with Linux [slightly modified man page]

Name: find –  search for files in a directory hierarchy

Synopsis: find [directory where to search]

Basic finding options:

  • find . – find in current directory
  • find /etc – find in the etc directory
  • find / – find in the root directory

Continue reading “Finding files in Linux”