[Mint] OpenSSH sftp functie werkt niet goed

Pagina: 1
Acties:

Acties:
  • 0 Henk 'm!

  • relativity
  • Registratie: Februari 2012
  • Laatst online: 26-09 19:53
Even een vraagje m.b.t. openssh; ik heb deze op mijn thuisserver geinstalleerd, maar ik niet inloggen via sftp, dan verbreekt hij de verbinding, erg vervelend. Shell werkt overigens wel gewoon.

Als ik op mijn desktop-pc namelijk bij mijn bestanden moet is het namelijk erg handig. Of via de telefoon.
code:
1
2
3
4
5
6
7
mainstream@oxytocine-pc ~ $ dpkg -l openssh-server 
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  openssh-server 1:6.6p1-2ubu amd64        secure shell (SSH) server, for se

Verbinding maken doet hij wel, maar zo gauw als ik inlog krijg ik (bijv. via de telefoon - sftp): a network error has occured communicating with host 192.168.x.x

Ook met winSCP (windows client) krijg ik foutmeldingen. Dit probleem heb ik overigens sinds ik Linux mint heb geinstalleerd. Eerder kwam dit probleem niet voor.

Iemand een idee?

Acties:
  • 0 Henk 'm!

  • Hero of Time
  • Registratie: Oktober 2004
  • Laatst online: 21:30

Hero of Time

Moderator LNX

There is only one Legend

Wat zie je in je logs en heb je nog wat aangepast aan je configuratie voor openssh? Een gewone SSH sessie werkt, maar heb je ook al via een SFTP client op je lokale machine of andere Linux PC geprobeerd verbinding te maken? Heb je ook al met scp gewerkt?

Commandline FTW | Tweakt met mate


Acties:
  • 0 Henk 'm!

  • relativity
  • Registratie: Februari 2012
  • Laatst online: 26-09 19:53
Hero of Time schreef op zondag 25 januari 2015 @ 15:46:
Wat zie je in je logs en heb je nog wat aangepast aan je configuratie voor openssh? Een gewone SSH sessie werkt, maar heb je ook al via een SFTP client op je lokale machine of andere Linux PC geprobeerd verbinding te maken? Heb je ook al met scp gewerkt?
Op de lokale machine:
Afbeeldingslocatie: http://i60.tinypic.com/2wnz0a8.png
Dit zijn de logs:
code:
1
2
3
4
5
6
mainstream@oxytocine-pc ~ $ grep 'sshd' /var/log/auth.log
Jan 25 20:46:45 oxytocine-pc sshd[1276]: Server listening on 0.0.0.0 port 1337.
Jan 25 20:46:45 oxytocine-pc sshd[1276]: Server listening on :: port 1337.
Jan 25 21:00:26 oxytocine-pc sshd[6888]: pam_ecryptfs: pam_sm_authenticate: /home/mainstream is already mounted
Jan 25 21:00:26 oxytocine-pc sshd[6888]: Accepted password for mainstream from 127.0.0.1 port 59156 ssh2
Jan 25 21:00:26 oxytocine-pc sshd[6888]: pam_unix(sshd:session): session opened for user mainstream by (uid=0)


code:
1
2
3
mainstream@oxytocine-pc ~ $ sftp -P 1337 mainstream@localhost
Linux Mint 17.1 Rebeccamainstream@localhost's password: 
Received message too long 458961211


Aan de configuratie heb ik weinig veranderd. Ik kan de configuratie wel even posten.

[ Voor 7% gewijzigd door relativity op 25-01-2015 21:13 ]


Acties:
  • 0 Henk 'm!

  • 0xDEADBEEF
  • Registratie: December 2003
  • Niet online
/etc/motd niet laten weergeven helpt wellicht.

Inloggen over ssh zelf werkt wel?

"Religion is an insult to human dignity. With or without it you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion." - Steven Weinberg


Acties:
  • 0 Henk 'm!

  • relativity
  • Registratie: Februari 2012
  • Laatst online: 26-09 19:53
0xDEADBEEF schreef op zondag 25 januari 2015 @ 21:22:
/etc/motd niet laten weergeven helpt wellicht.

Inloggen over ssh zelf werkt wel?
Heb ik al geprobeerd... Bedankt voor de tip.

Ik heb het al gevonden. Echo commando's in mijn ~/.bashrc zorgden voor deze problemen...
Er stonden wat keyboard shortcuts in:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
echo -e "\033[1;32mKEYBOARD SHORTCUTS\033[0;0m"
echo -e "  Up Arrow \033[38;5;202m–\033[38;5;84m Show the previous command \033[0;0m"
echo -e "  Ctrl + R \033[38;5;202m–\033[38;5;84m Allows you to type a part of the command and find it \033[0;0m"
echo -e "  Ctrl + Z \033[38;5;202m–\033[38;5;84m Stops the current command \033[0;0m"
echo -e "  Ctrl + C \033[38;5;202m–\033[38;5;84m Halts the current command \033[0;0m"
echo -e "  Ctrl + L \033[38;5;202m–\033[38;5;84m Clear the screen \033[0;0m"
echo -e "  Esc  + . \033[38;5;202m–\033[38;5;84m Insert the last argument of previous command \033[0;0m"
echo -e "  Ctrl + A \033[38;5;202m–\033[38;5;84m Return to the start of the command you're typing \033[0;0m"
echo -e "  Ctrl + E \033[38;5;202m–\033[38;5;84m Go to the end of the command you're typing \033[0;0m"
echo -e "  Ctrl + U \033[38;5;202m–\033[38;5;84m Cut before the cursor to special clipboard, erases line \033[0;0m"
echo -e "  Ctrl + K \033[38;5;202m–\033[38;5;84m Cut after the cursor to a special clipboard \033[0;0m"
echo -e "  Ctrl + Y \033[38;5;202m–\033[38;5;84m Paste from special clipboard \033[0;0m"
echo -e "  Ctrl + T \033[38;5;202m–\033[38;5;84m Swap the two characters before the cursor \033[0;0m"
echo -e "  Ctrl + W \033[38;5;202m–\033[38;5;84m Delete the word / argument left of the cursor \033[0;0m"
echo -e "  Ctrl + D \033[38;5;202m–\033[38;5;84m Log out of current session, similar to exit \033[0;0m"


Iemand die misschien een oplossing heeft voor dit probleem?

Acties:
  • 0 Henk 'm!

  • thunder7
  • Registratie: Januari 2003
  • Laatst online: 06:01

thunder7

houten vaas/schaal nodig?

Je .bashrc zo aanpassen dat dit alleen weergegeven wordt als er een daadwerkelijke gebruiker inlogt (dus de output van het tty commando controleren) ?

hout-nerd - www.hetmooistehout.nl of www.houtenschalen.nl


Acties:
  • 0 Henk 'm!

  • Hero of Time
  • Registratie: Oktober 2004
  • Laatst online: 21:30

Hero of Time

Moderator LNX

There is only one Legend

relativity schreef op zondag 25 januari 2015 @ 21:27:
Ik heb het al gevonden. Echo commando's in mijn ~/.bashrc zorgden voor deze problemen...
Er stonden wat keyboard shortcuts in:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
echo -e "\033[1;32mKEYBOARD SHORTCUTS\033[0;0m"
echo -e "  Up Arrow \033[38;5;202m–\033[38;5;84m Show the previous command \033[0;0m"
echo -e "  Ctrl + R \033[38;5;202m–\033[38;5;84m Allows you to type a part of the command and find it \033[0;0m"
echo -e "  Ctrl + Z \033[38;5;202m–\033[38;5;84m Stops the current command \033[0;0m"
echo -e "  Ctrl + C \033[38;5;202m–\033[38;5;84m Halts the current command \033[0;0m"
echo -e "  Ctrl + L \033[38;5;202m–\033[38;5;84m Clear the screen \033[0;0m"
echo -e "  Esc  + . \033[38;5;202m–\033[38;5;84m Insert the last argument of previous command \033[0;0m"
echo -e "  Ctrl + A \033[38;5;202m–\033[38;5;84m Return to the start of the command you're typing \033[0;0m"
echo -e "  Ctrl + E \033[38;5;202m–\033[38;5;84m Go to the end of the command you're typing \033[0;0m"
echo -e "  Ctrl + U \033[38;5;202m–\033[38;5;84m Cut before the cursor to special clipboard, erases line \033[0;0m"
echo -e "  Ctrl + K \033[38;5;202m–\033[38;5;84m Cut after the cursor to a special clipboard \033[0;0m"
echo -e "  Ctrl + Y \033[38;5;202m–\033[38;5;84m Paste from special clipboard \033[0;0m"
echo -e "  Ctrl + T \033[38;5;202m–\033[38;5;84m Swap the two characters before the cursor \033[0;0m"
echo -e "  Ctrl + W \033[38;5;202m–\033[38;5;84m Delete the word / argument left of the cursor \033[0;0m"
echo -e "  Ctrl + D \033[38;5;202m–\033[38;5;84m Log out of current session, similar to exit \033[0;0m"


Iemand die misschien een oplossing heeft voor dit probleem?
Gewoon niet in je .bashrc dumpen? Het klinkt misschien zo simpel, maar waarom zou je bij 't aanmelden je sneltoetsen willen zien die je na een paar commando's toch niet meer kan lezen? Je hebt al moeite gedaan om 't erin te zetten, dan weet je 't toch onderhand wel wat ze doen? Zelfde als de spiekbriefjes op school, maken is goed, gebruiken geen zin want je weet al wat erop staat.

Kan je 't echt niet onthouden, dan maak je er een functie van die je aan kan roepen waarmee 't on-demand op je scherm komt.

Commandline FTW | Tweakt met mate


Acties:
  • 0 Henk 'm!

  • sam.vimes
  • Registratie: Januari 2007
  • Laatst online: 08-06 08:44
Zet je echo commando's in een voorwaardelijk blok als je stdin een terminal is:
code:
1
2
3
4
if [ -t 0 ]
then
  ...
fi

Acties:
  • 0 Henk 'm!

  • deadinspace
  • Registratie: Juni 2001
  • Laatst online: 01-10 08:15

deadinspace

The what goes where now?

thunder7 schreef op zondag 25 januari 2015 @ 21:36:
Je .bashrc zo aanpassen dat dit alleen weergegeven wordt als er een daadwerkelijke gebruiker inlogt (dus de output van het tty commando controleren) ?
sam.vimes schreef op dinsdag 27 januari 2015 @ 23:02:
Zet je echo commando's in een voorwaardelijk blok als je stdin een terminal is: [...]
In plaats daarvan is het veel beter om dit niet in .bashrc te zetten, maar bijvoorbeeld in .profile .

.profile wordt alleen gesourced door login shells, dus dat is de plaats om dit soort dingen weer te geven.

.bashrc wordt gesourced door interactieve non-login shells (wat voor sftp gebruikt wordt) en is daarmee simpelweg niet de plaats om dingen te echo'en, alleen om dingen in te stellen.

Zie bv ook http://stackoverflow.com/...h-profile-and-environment

Acties:
  • 0 Henk 'm!

  • Thc_Nbl
  • Registratie: Juli 2001
  • Laatst online: 21-05 22:24
heb je al eens naar MySecureShell gekeken.
het is nog nooit zo makkelijk geweest om een SFTP server op te zetten..

kijk hier maar eens.

http://www.unixmen.com/setup-secure-ftp-server-mysecureshell/

werkt ook voor mint.

ehhh.. noppes


Acties:
  • 0 Henk 'm!

  • Hero of Time
  • Registratie: Oktober 2004
  • Laatst online: 21:30

Hero of Time

Moderator LNX

There is only one Legend

Thc_Nbl schreef op woensdag 28 januari 2015 @ 12:50:
heb je al eens naar MySecureShell gekeken.
het is nog nooit zo makkelijk geweest om een SFTP server op te zetten..

kijk hier maar eens.

http://www.unixmen.com/setup-secure-ftp-server-mysecureshell/

werkt ook voor mint.
Ehm, wat is er makkelijker dan 'sudo apt-get install openssh-server' uitvoeren? Standaard zit daar al SFTP functionaliteit in. Het is dat de TS troep in z'n .bashrc had staan, maar met een standaard installatie hoef je niets meer te doen.

Commandline FTW | Tweakt met mate

Pagina: 1