LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-15-2016, 11:40 AM   #1
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
ssh'ing


Ok I am soo having ssh problems. maybe its because I have no real Idea what I am doing.

I got a ssh server set up on my linux (void) and a ssh app on my android phone. (galaxy core prime).

I have a public wifi connection beteen the both. (google startbucks).

I have an ip address xxx.xxx.xxx.xxx

In Vbox I can get ssh to work, but that is different, it is not completely outside of my laptop.

I've tried ssh autotunnel, ssh server (app) going the other way, pc -> phone. still not getting it.

I'm sure their is a few of your techies that have done this sooo,

how do I get the phone to connect to my linux using ssh?

ftp even to get files off of pc into phone sdcard.

thanks

BTW
I tried pinging my laptop through my phone an it does not see it. of course... (while using a terminal app on my phone)

Last edited by BW-userx; 02-15-2016 at 12:00 PM.
 
Old 02-15-2016, 12:12 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Your home computer is probably behind NAT router, meaning you need to set up port forwarding in your router.
 
Old 02-15-2016, 12:14 PM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
i would first troubleshoot this within the same system:
Code:
ssh localhost
if that worx then try it on another computer on the same network:
Code:
ssh 192.168.1.x
if that worx then try outside the network using sshd debug mode
Code:
sudo /usr/sbin/sshd -d -d -d # on the server
ssh -v -v -v user@host
and post the output.

did you forward port 22 within your routers configuration ? maybe posting your /etc/ssh/sshd_config mite also help.
 
Old 02-15-2016, 12:44 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
You might need to provide some additional information on how your home network is configured. Are you trying to connect to a physical or virtual machine? Since you are trying to use Autotunnel it appears you want to connect to VM via its host. If you are trying to connect to a VM is it using NAT or bridge configured network adapter?
 
Old 02-15-2016, 12:44 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
You might need to provide some additional information on how your home network is configured. Are you trying to connect to a physical or virtual machine? Since you are trying to use Autotunnel it appears you want to connect to VM via its host. If you are trying to connect to a VM is it using NAT or bridge configured network adapter?
 
Old 02-15-2016, 12:45 PM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by Emerson View Post
Your home computer is probably behind NAT router, meaning you need to set up port forwarding in your router.
I have no access to the router I'm at a name brand coffee house

I changed the settings to IPv4 settings in NetWorkManager

Code:
Method: Automatic (DHCP) address only
DNS servers 8.8.8.8 , 8.8.4.4 (googles DNS)
then search domains.
my domain name I gave my linux laptop
 
Old 02-15-2016, 12:51 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Sorry, it appeared that you wanted to connect from your phone to your home desktop.

So are you trying to connect to the host or guest on your laptop? Are they both running linux?
 
Old 02-15-2016, 12:53 PM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by schneidz View Post
i would first troubleshoot this within the same system:
Code:
ssh localhost
if that worx then try it on another computer on the same network:
Code:
ssh 192.168.1.x
if that worx then try outside the network using sshd debug mode
Code:
sudo /usr/sbin/sshd -d -d -d # on the server
ssh -v -v -v user@host
and post the output.

did you forward port 22 within your routers configuration ? maybe posting your /etc/ssh/sshd_config mite also help.

sshd conf


Code:
 sudo cat  /etc/ssh/sshd_config
#	$OpenBSD: sshd_config,v 1.97 2015/08/06 14:53:21 deraadt Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.
default port is 22 yes??
the rest of it

Code:
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# The default requires explicit activation of protocol 1
#Protocol 2

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024

# Ciphers and keying
#RekeyLimit default none

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#RSAAuthentication yes
#PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile	.ssh/authorized_keys

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation sandbox		# Default for new installations.
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
#Banner none

# override default of no subsystems
Subsystem	sftp	/usr/libexec/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#	X11Forwarding no
#	AllowTcpForwarding no
#	PermitTTY no
#	ForceCommand cvs server
I'm getting wifi off a local coffee shop router
I'm eating PPJ right now don't want to type while sticky finger mode is ON

Last edited by BW-userx; 02-15-2016 at 12:54 PM.
 
Old 02-15-2016, 01:57 PM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by BW-userx View Post
(google startbucks).
have you considered that the free wifi access point might be influencing or even blocking your attempts?
i'd try this first from the safety of your home (network), and only after that in the wild.
basically, it is possible.
what are you using to shh from your phone?
 
Old 02-15-2016, 02:03 PM   #10
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by ondoho View Post
have you considered that the free wifi access point might be influencing or even blocking your attempts?
i'd try this first from the safety of your home (network), and only after that in the wild.
basically, it is possible.
what are you using to shh from your phone?
ab-so-lute-ly

was just in hope mode that someone might know how to get though that f**kin' thing

it is a no security wifi

SSL tunneling

Last edited by BW-userx; 02-15-2016 at 02:28 PM.
 
Old 02-16-2016, 11:41 PM   #11
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Don't bother with ssh. Install Airdroid on the phone. Run it, and it will give you an ip address to put into your laptop browser. When you do that, you'll get a popup on the phone asking permission to connect to the laptop. Tap ok and you have complete access to everything on the phone from the browser. You can transfer files either way, access your contacts, send and receive SMS messages from the laptop using a real keyboard, and pretty much anything else on the phone. No need to do anything with the router, it just works.
 
Old 02-17-2016, 05:44 AM   #12
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
AirDroid --- > cheking it out ---->

I have an iPhone that I could not get iTunes to see it, but I'd still charge. So no more connecting to iTunes to shove what ever I wanted into that iPhone.

But, I have this app that uses wifi and plays moves or music. So I started using that. Then one day it updated.

Taking that abiltiy out of it, now it doesn't do that N E More.

Now you're telling my about this app called AirDroid.

So from you. Yes YOU.

Here we have another example of -yes- it can be done.

If they can write an app that will allow a user to get through public wifi as such that you explained as well. Then what is there "secret" in how they got past that router, when I cannot, even when I use ssh or any other method?

If they can do it , then why can't I? (or even you)

-----------


OH OH OH
I just installed it.. wouldn't you know. I got to get an account with them?

WTF.....


TCP/IP classes or lack thereof that's why

Last edited by BW-userx; 02-17-2016 at 05:58 AM.
 
Old 02-17-2016, 06:47 AM   #13
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
AirDroid opens the connection from inside. You cannot get thru NAT router initiating connection from outside. This is the way viruses work, first they need to get into computer somehow, then they open a connection to the master.
Of course you need to open an account with them to use their DNS to find your phone. How do you think your phone would be found without?!
 
Old 02-17-2016, 06:51 AM   #14
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by Emerson View Post
AirDroid opens the connection from inside. You cannot get thru NAT router initiating connection from outside. This is the way viruses work, first they need to get into computer somehow, then they open a connection to the master.

Of course you need to open an account with them to use their DNS to find your phone. How do you think your phone would be found without?!
no not really.. they already have my IP off my phone, that is just a step they put in there for other reasons.
they could remove that step and it'd still work.

as I am already looking at the ip address and port number to use. already.

created an account, typed in that ip : port info -> File Transferr -> AirDriod Web -> ..... timed out in my laptop webpage. NOTHING ... ooooooOOoOOOoooOOooohhh



takes back -> they could remove that step and it'd still work.

mod:

Code:
Search Results

    Connect your computer to the Android hotspot wireless network you just created. The hotspot name should be something like AndroidAP. Open AirDroid on your device, go to Tools tab, and press Tethering. A new AirDroild url like “http://192.168.43.1:8888” will be displayed.
got a do more setup then just type in ip in addy bar?

Last edited by BW-userx; 02-17-2016 at 07:12 AM.
 
Old 02-17-2016, 07:03 AM   #15
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
And how they have the IP of your phone? When you move around the IP of your phone may change, how the computer in the coffee house is supposed to know what the new IP address is?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH'ing in shell script es0teric Programming 6 07-24-2008 12:58 PM
ssh'ing an xbox kybishop Linux - Networking 8 01-26-2007 03:08 PM
SSH'ing between two computers through a router kz26 Linux - Networking 6 08-14-2005 11:09 PM
SSH-ing to computer behind router ar1 Linux - Networking 1 01-09-2005 10:15 PM
ssh'ing to hostname hagbardc Linux - Software 4 06-21-2003 10:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration