LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-13-2017, 11:09 AM   #16
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51

I see. So some care must be taken when more options are present in ~/.ssh/config - which was not my case, but I am sure that others that read this thread will use the
note you wrote on #15.

^,^
 
Old 10-13-2017, 11:35 AM   #17
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Question

Quote:
Originally Posted by pan64 View Post
in that case you may try to check logs to find the reason (on both client/server side).
I am pretty sure the problem is at my ISP because the behaviour did not happen with only one server. Any ssh session had it, and I confirmed there was no limit imposed in one server I eventually use.

On the other hand, I do not know which log file I should check, nor if I have access to the needed logs in a server (no root access) or any second level remote machine.

/var/log/auth* are not accessible in the machines where I do not have root access.

The network I access in the server I talked about in this thread is:

- local machine do 'ssh me@remote.server.is' to access a private network

- from remote.server.is command line, do 'ssh other.comp' ("other.comp" cannot be accessed directly)

For the broken connections, would I want to check the logs for remove.server.is? For other.comp machine? For both?

Or just my local logs are enough to point the problem cause? (but, as I said above, I do not know which files to check and what is expected to be found)
 
Old 10-13-2017, 11:46 AM   #18
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,309
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Quote:
Originally Posted by dedec0 View Post
The network I access in the server I talked about in this thread is:

- local machine do 'ssh me@remote.server.is' to access a private network

- from remote.server.is command line, do 'ssh other.comp' ("other.comp" cannot be accessed directly)
(I'll hop over the log question.)

Going through a jump host aka bastion should be done using either the ProxyJump directive if you are using a new SSH client or ProxyCommand if you are using an old one. Otherwise if you connect with an SSH client to the bastion and then another SSH client to the inner host, you are trusting the bastion with all the secrets you might type into the inner host. By using ProxyJump or ProxyCommand you instead have an encrypted connection all the way through to your destination.

So for a new SSH client, ProxyJump can be put into ~/.ssh/config or else a -J used as a runtime option:

Code:
ssh -J me@remote.server.is dedec0@other.comp
Or for an old SSH client, the ProxyCommand directive can go into ~/.ssh/config or used with -o as a runtime option.

Code:
ssh -o ProxyCommand='ssh -W %h:%p remote.server.is' other.comp
If you're stuck with an old SSH client, then I'd put everything into ~/.ssh/config.

Last edited by Turbocapitalist; 10-13-2017 at 11:51 AM.
 
Old 10-13-2017, 12:30 PM   #19
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Question Re: (...) Do you still think I should ProxyJump to them?

Quote:
Originally Posted by Turbocapitalist View Post
(I'll hop over the log question.)

Going through a jump host aka bastion should be done using either the ProxyJump directive if you are using a new SSH client or ProxyCommand if you are using an old one. Otherwise if you connect with an SSH client to the bastion and then another SSH client to the inner host, you are trusting the bastion with all the secrets you might type into the inner host. By using ProxyJump or ProxyCommand you instead have an encrypted connection all the way through to your destination.

So for a new SSH client, ProxyJump can be put into ~/.ssh/config or else a -J used as a runtime option:

Code:
ssh -J me@remote.server.is dedec0@other.comp
Or for an old SSH client, the ProxyCommand directive can go into ~/.ssh/config or used with -o as a runtime option.

Code:
ssh -o ProxyCommand='ssh -W %h:%p remote.server.is' other.comp
If you're stuck with an old SSH client, then I'd put everything into ~/.ssh/config.
No big problem with the logs, someone will eventually say something.

You pointed and described a situation that I am not sure it is what I have.

The "second level" machine I described is accessed with the same account and password I use to access the first server (among other things like files, programs, ...). I had (and have) no worry in showing everything I do on the second machine for the first one. They are basically the same, except that the Internet accessible server is a FreeBSD that should not be used for many tasks beside accessing the private network. My terminal usually get these commands:

Code:
$ ssh me@remove.server.is # at local machine
$ ssh private.machine # at Internet accessible machine, same user+pw
$ command1 # private network machine
[... output ...]
$ command2 # private network machine
[... output ...]
$ command3 # private network machine
[... output ...]
$ command4 # private network machine
[... output ...]
$ ^D # out of private.machine
$ ^D # out of remove.server.is
$ ^D # close my local terminal window
Further, there are several private.machine's, sometimes I change which one I use. There are eventual access problems in them.

Do you still think I should ProxyJump to them? I would (at least, I imagine) need to configure several DNS names for those remote machines I cannot access from my home or from eventual accesses around the Internet.
 
Old 10-13-2017, 12:54 PM   #20
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,309
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Quote:
Originally Posted by dedec0 View Post
Do you still think I should ProxyJump to them?
Yes, or else ProxyCommand. Then you can just connect to the shortcut and it will automatically pass through the bastion host. ssh private1

Can you use the -J option with your SSH client or does it complain?

Code:
Host private1 private1.machine
        User me
        Hostname private1.machine
        ProxyJump me@remove.server.is:22

Host private2 private1.machine
        User me
        Hostname private2.machine
        ProxyJump me@remove.server.is:22

Host *
        ServerAliveInterval 31
If it complains then use ProxyCommand:

Code:
Host private1 private1.machine
        User me
        Hostname private1.machine
        ProxyCommand ssh -W %h:%p remove.server.is

Host private2 private1.machine
        User me
        Hostname private2.machine
        ProxyCommand ssh -W %h:%p remove.server.is

Host *
        ServerAliveInterval 31
You can use keys for any of them, too, by adding IdentityFile in the right places. No changes are needed to the machine in the middle, even if it is still running FreeBSD.

DNS entries are not needed you can go by IP address, too. Either way it is the bastion host / jump host access to names that counts. You can make shortcuts in your ~/.ssh/config file however.
 
  


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
Problem using screen: Cannot open your terminal '/dev/pts/0' - please check. stefaandk Linux - General 18 06-17-2014 07:52 PM
[SOLVED] Terminal Emulation & /dev/pts and /dev/shm Issues on Kernel 3.4.3 unassailable Gentoo 8 10-27-2012 11:03 PM
pseudo terminals: /dev/ptmx <-> /dev/pts/ vs. /dev/ptyp <-> /dev/ttyp rtspitz Linux - Software 2 12-02-2011 02:07 PM
Connect via SSH to remote /dev/pts/X antonko Linux - Newbie 2 01-23-2011 09:40 AM
Cannot open your terminal '/dev/pts/5' - please check Laodiceans Slackware 3 12-27-2009 07:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:10 PM.

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