title: ssh Banana pi with mac
body: <p>So I want to control my banana pi with my macbook pro using SSH. It is the first I am using ssh. So I followed a lot of different tutorials and it still does not work.
  If I run :</p>
  
  <pre><code>pi@172.25.54.12
  </code></pre>
  
  <p>or</p>
  
  <pre><code>bananapi@172.25.54.12
  </code></pre>
  
  <p>or whatever name I try it answers me that</p>
  
  <blockquote>
    <p>ssh: connect to host 172.25.*.*2 port 22: Operation timed out</p>
  </blockquote>
  
  <p>and when I try </p>
  
  <pre><code>bananapi@localhost
  </code></pre>
  
  <p>or</p>
  
  <pre><code>pi@localhost
  </code></pre>
  
  <p>it answers me:</p>
  
  <blockquote>
    <p>ssh: connect to host localhost port 22: Connection refused</p>
  </blockquote>
  
  <p>I found my IP address doing ifconfig on my bananapi.
  My bananapi is using bananian (debian for banana pi), and my mac is 10.10.3.</p>
  
  <p>When I run sshd -T, I have:</p>
  
  <pre><code>port 22
  protocol 2
  addressfamily any
  listenaddress 0.0.0.0:22
  listenaddress [::]:22
  usepam 1
  serverkeybits 768
  logingracetime 120
  keyregenerationinterval 3600
  x11displayoffset 10
  maxauthtries 6
  maxsessions 10
  clientaliveinterval 0
  clientalivecountmax 3
  permitrootlogin yes
  ignorerhosts yes
  ignoreuserknownhosts no
  rhostsrsaauthentication no
  hostbasedauthentication no
  hostbasedusesnamefrompacketonly no
  rsaauthentication yes
  pubkeyauthentication yes
  kerberosauthentication no
  kerberosorlocalpasswd yes
  kerberosticketcleanup yes
  gssapiauthentication no
  gssapikeyexchange no
  gssapicleanupcredentials yes
  gssapistrictacceptorcheck yes
  gssapistorecredentialsonrekey no
  passwordauthentication yes
  kbdinteractiveauthentication no
  challengeresponseauthentication no
  printmotd no
  printlastlog yes
  x11forwarding yes
  x11uselocalhost yes
  strictmodes yes
  tcpkeepalive yes
  permitblacklistedkeys no
  permitemptypasswords no
  permituserenvironment no
  uselogin no
  compression delayed
  gatewayports no
  usedns no
  allowtcpforwarding yes
  useprivilegeseparation yes
  pidfile /var/run/sshd.pid
  xauthlocation /usr/bin/xauth
  ciphers aes256-ctr,aes128-ctr
  macs hmac-sha2-512,hmac-sha2-256,hmac-ripemd160
  loglevel INFO
  syslogfacility AUTH
  authorizedkeysfile .ssh/authorized_keys .ssh/authorized_keys2
  hostkey /etc/ssh/ssh_host_rsa_key
  acceptenv LANG
  acceptenv LC_*
  subsystem sftp /usr/lib/openssh/sftp-server
  maxstartups 10:30:100
  permittunnel no
  ipqos lowdelay throughput
  permitopen any
  </code></pre>
  
  <p>Any idea?</p>
  
  <p>edit:
  so as suggested in the comments, I did a :</p>
  
  <pre><code>$ ls -al ~/.ssh
  total 24  drwx------ 5 ***************** staff 170 12 mai 13:27 . 
  drwxr-xr-x 53 **************** staff 1802 12 mai 11:16 .. 
  -rw------- 1 ***************** staff 1766 12 mai 11:16 authorized_keys 
  -rw------- 1 ***************** staff 1679 12 mai 13:27 id_rsa 
  -rw-r--r-- 1 ***************** staff 429 12 mai 13:27 id_rsa.pub –
  </code></pre>
  
  <p>This is what I get as an answer. So I have a key in the <code>authorized_keys</code> file.
  Do I have to send it (the public key) to my banana pi?</p>
  
  <p>edit#2:
  here is my adress less hidden 172.25.54.12 All I want for now is just connect my mac to my banana pi and control it as a server. So my Mac would be the client, and my banana pi my "host".
   When I run </p>
  
  <pre><code>netstat -an | grep 22
  
  tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      
  tcp6       0      0 :::22                   :::*           LISTEN      
  udp        0      0 0.0.0.0:32622           0.0.0.0:*      
  unix  3      [ ]         STREAM     CONNECTED     4122      
  unix  3    [ ]         STREAM     CONNECTED     2922     @/tmp/.X11-unix/X0
  </code></pre>
  
  <p>Basically what I did is, I followed some tutorial on the internet (like this one <a href="https://www.youtube.com/watch?v=0wn44MbxtZw" rel="nofollow">https://www.youtube.com/watch?v=0wn44MbxtZw</a>) but it does not work.</p>
  
  <p>edit#3:
  I tried with a PC and puTTY, and I have got an error:
  Network error: Network is unreachable.</p>
  
  <p>Maybe it can help.</p>
  
  <p>Edit#4</p>
  
  <p>Ok I understood a part of my problem: I thought it was possible to connect directly my two devices without using the local network. I mean directly connect my banana pi to my mac just with one ethernet cable. But my goal is to be able to connect to my banana pi even when it is not connected to any network (is thath possible?), so I want to use an static IP address, is that a good idea?</p>