Showing posts with label #SSH. Show all posts
Showing posts with label #SSH. Show all posts

2014-06-29

Using FUSE to store RaspiVid video files remotely

 In working with the Raspberry Camera Module and the supplied RaspiCam utilities, it became desirable to store capture video data files somewhere besides the local filesystem of the Raspberry Pi devices.  The solution most immediately presenting itself was to utilize the sshfs utility to create a FUSE mount of a user-accessible directory on a centralized mass-storage server.

Prerequisites:
  1.  sshfs installed on Raspberry Pi
  2.  server is running ssh
  3.  pi has server account
  4.  pi has generated ssh ID
  5.  pi has ID loaded in active ssh-key-agent
  6. server pi acct has pi ID in authorized keys list
Server user account is:  pi
Server directory to mount:  /home/pi/Videos
Local directory to mount on:  ./Videos
Cmd: 
   sshfs pi@server.nym:/home/pi/Videos ./Videos

With the mount in place, we can ...
cd Videos
raspivid -o ./raspivideo.h264 -n -k
to store a segment of video to the remote server's file system.

2014-06-09

SSH-client for ChromeOS


Using Secure Shell version 0.8.27 app for ChromeOS.

The only text in the Secure Shell app that shows what it is, where it came from, or promises any information about how to use the app is printed in the Terminal window when the app is opened:

Welcome to Secure Shell version 0.8.27.
Answers to Frequently Asked Questions: http://goo.gl/TK7876

The goo.gl URL above expands to https://chromium.googlesource.com/apps/libapps/+/master/nassh/doc/faq.txt  which is a pointer into the Secure Shell app source code libraries at the Google Git repository:  
    https://chromium.googlesource.com/apps/libapps/+/master/

2014-06-07

How to use only one instance of ssh-agent per host, purr user.

This is a script to connect to a running ssh-agent from a user shell, add the user's default DSA identity
#!/bin/sh 
# The following command returns the PID of the currently 
#   running ssh-agent process; This value needs to get stored into
#   SSH_AGENT_PID
#
# ps -u $USER | grep ssh-agent | sed -e 's/^\s*//;' | cut -d' ' -f1
#
# The other value we want in order to be able to use an instance of 
# ssh-agent is the SSH_AUTH_SOCK value - this is a file system name 
# a socket maintained by the ssh-agent instance.  It will be in the
# ${TMP}/ directory space...
export SSH_AUTH_SOCK=`ls --color=none /tmp/ssh-*/agent.*`
export SSH_AGENT_PID=`ps -u $USER | grep ssh-agent | sed -e 's/^\s*//;' | cut -d' ' -f1`
echo SSH_AGENT_PID: $SSH_AGENT_PID
echo SSH_AUTH_SOCK: $SSH_AUTH_SOCK
echo "Adding default .ssh/id_dsa using ssh-add..."
ssh-add
echo kthxbai.